This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
memory leak #35
Labels
Comments
ceejbot
added a commit
to ceejbot/node-oniguruma
that referenced
this issue
Sep 15, 2015
Added a destructor that resets the Persistent to free the memory used for it.
ceejbot
added a commit
to ceejbot/node-oniguruma
that referenced
this issue
Sep 15, 2015
Added a destructor that resets the Persistent to free the memory used for it.
zcbenz
added a commit
that referenced
this issue
Sep 16, 2015
Fixed bug #35: memory leak in OnigStringContext
soldair
pushed a commit
to soldair/node-oniguruma
that referenced
this issue
Sep 18, 2015
Added a destructor that resets the Persistent to free the memory used for it.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
There is a memory leak in the native binding. This simplified test leaks about 3.75mb per 100k lines , but adds up more quickly in relationship to line length.
i traced it to this line
lastSource = shared_ptr<OnigStringContext>(new OnigStringContext(v8String));
https://github.com/atom/node-oniguruma/blob/master/src/onig-scanner.cc#L74
and confirmed the leak happens with a
return Nan::Null();
right after. and no leak with the return right before.reproduction
node --expose_gc --gc_global
in heapdumps you can see the leaking strings with no GC roots which points towards a native leak as well. I'm super duper rusty working in native modules so more help would be awesome.
confirmed on node 0.10, 0.12, 2.5, and 4.0
note version ^5.0.0 only compiled for me on node 4 and i used 4.2.2 for earlier versions of node.
The text was updated successfully, but these errors were encountered: