Skip to content

Commit

Permalink
Fix memory leak on the binary view if the input view is rebased durin…
Browse files Browse the repository at this point in the history
…g launch
  • Loading branch information
xusheng6 authored and plafosse committed Feb 22, 2024
1 parent cdf533b commit a214f0e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion core/processview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ void DebugProcessView::eventHandler(const DebuggerEvent &event)


DebugNullView::DebugNullView(BinaryView* parent) :
BinaryView("Debugger Null", parent->GetFile(), parent)
BinaryView("Debugger Null", parent->GetFile(), nullptr)
{
}

Expand Down
12 changes: 3 additions & 9 deletions ui/ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1190,15 +1190,9 @@ void DebuggerUI::updateUI(const DebuggerEvent& event)
ViewFrame* frame = m_context->getCurrentViewFrame();
FileContext* fileContext = frame->getFileContext();
fileContext->refreshDataViewCache();
auto tab = m_context->getTabForFile(fileContext);
ViewFrame* newFrame = m_context->openFileContext(fileContext);

if (newFrame)
{
m_context->closeTab(tab);
navigateToCurrentIP();
QCoreApplication::processEvents();
}
m_context->recreateViewFrames(fileContext);
navigateToCurrentIP();
QCoreApplication::processEvents();
}
else
{
Expand Down

0 comments on commit a214f0e

Please sign in to comment.