-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix memory leaks in Debugger #1411
Conversation
The main cause of this memory leak is correlation between GC-Object and Non-GC-Object
escargot/src/debugger/Debugger.h Lines 109 to 112 in 19498b4
At here, |
void DebuggerC::deleteClient() | ||
{ | ||
if (m_debuggerClient) { | ||
// delete DebuggerClient that was created and delivered from the user | ||
delete m_debuggerClient; | ||
m_debuggerClient = nullptr; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
m_debuggerClient
is a non-GC-object created by the user, so it should be deleted as well
@zherczeg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you for fixing this.
@zherczeg thanks for the quick review! |
* shared structure `BreakpointLocationsInfo` between debuggger and ByteCodeBlock can cause memory leaks * correctly delete each `BreakpointLocationsInfo` Signed-off-by: HyukWoo Park <[email protected]>
BreakpointLocationsInfo
between debuggger and ByteCodeBlock can cause memory leaksBreakpointLocationsInfo