{{ message }}
Commit 8be9bd1
src: remove extra heap allocation in GetSession()
Don't allocate + copy + free; allocate and fill in place, then hand off
the pointer to Buffer::New().
Avoids unnecessary heap allocations in the following methods:
- crypto.CryptoStream#getSession()
- tls.TLSSocket#getSession()
PR-URL: #14122
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent 8dd6866 commit 8be9bd1
1 file changed
Lines changed: 2 additions & 3 deletions

0 commit comments