You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
buffer.parent stores the parent Buffer instance when you call buffer.slice(), since slices reference the memory of the original buffer (no data copies are made). For new Buffers not originating from a slice, it's set to a chunk of memory from the pre-existing memory pool.
Additionally, I believe it also helps with GC, so that when all slices of a particular buffer get GC'ed, the parent buffer can then be automatically and safely GC'ed.
Buffers seem to have a parent object:
new Buffer('a').parent
I see no mention of this in the docs anywhere, and was just curious what this is.
Thanks,
Francisco
The text was updated successfully, but these errors were encountered: