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
we parent unparented nodes at the last minute so that xmlFreeDoc frees all the underlying memory for us
if two text nodes happen to end up siblings during that process, they are merged and libxml2 may allocate additional memory via ruby_xmalloc
it may be unsafe to allocate memory during GC, warnings will be raised
Working on #2807 made me realize that we're doing more work during the deallocate function than I thought -- so it's both slower and less safe than it could be.
I have at least one idea, which is instead of parenting the unparented nodes, just call xmlFreeNode on them to avoid the parenting overhead.