Skip to content

Commit

Permalink
Prevent memory leak after refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
jsiegle committed Sep 25, 2024
1 parent 7380e06 commit 0b3b2f7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/NeuropixEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -520,16 +520,16 @@ void NeuropixEditor::resetCanvas()
{
VisualizerEditor::canvas.reset();

checkForCanvas();

if (tabIndex != -1)
{
removeTab (tabIndex);
addTab (thread->type == ONEBOX ? "OneBox" : "Neuropix PXI",
createNewCanvas());
VisualizerEditor::canvas.get());
}
else
{
checkForCanvas();

if (dataWindow != nullptr)
dataWindow->setContentNonOwned (VisualizerEditor::canvas.get(), false);
}
Expand Down

0 comments on commit 0b3b2f7

Please sign in to comment.