Skip to content

Commit 7650d08

Browse files
committed
Add a release of the parent JS connection to ILob::cleanup so GC kicks in
1 parent ef997ac commit 7650d08

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/njs/src/njsIntLob.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ ILob::~ILob()
136136

137137
void ILob::cleanup()
138138
{
139+
this->jsParent_.Reset ();
139140
if (buf_)
140141
{
141142
delete [] buf_;
@@ -371,10 +372,8 @@ NAN_METHOD(ILob::Release)
371372
}
372373

373374
/*
374-
* When we release the iLob, we have to clear the reference of
375-
* its parent jsConn.
375+
* cleanup() will clear the reference of its parent jsConn.
376376
*/
377-
iLob->jsParent_.Reset ();
378377
iLob->cleanup();
379378

380379
info.GetReturnValue().SetUndefined();

0 commit comments

Comments
 (0)