Skip to content

Commit

Permalink
Merge pull request #441 from gdt050579/440-core-fix-memory-leak-cause…
Browse files Browse the repository at this point in the history
…d-by-not-releasing-the-memory-of-the-control

[440] fix memory leak
  • Loading branch information
gheorghitamutu authored Mar 15, 2024
2 parents 612de35 + 895ebdd commit 5c99613
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions AppCUI/src/Controls/Control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1208,6 +1208,7 @@ bool Controls::Control::RemoveControlByID(uint32 index)
Control** lst = CTRLC->Controls;
CHECK(lst != nullptr, false, "Expecting a non-nullptr list of control !");
this->OnControlRemoved(lst[index]);
delete lst[index];
uint32 count = CTRLC->ControlsCount;
index++;
while (index < count)
Expand Down

0 comments on commit 5c99613

Please sign in to comment.