Skip to content

Commit f8c3a72

Browse files
committed
Fix memory leak
FolderDisplay.cpp ~ deallocate old data during pointer swap
1 parent 5c29196 commit f8c3a72

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

source/FolderDisplay.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,8 @@ void FolderDisplay::OnUpdateUI(wxCommandEvent& event){
298298
//update size in parent
299299
if (old_parent != nullptr){
300300
old_parent->size -= data->size;
301+
//deallocate old data
302+
delete data;
301303
data = fd;
302304
old_parent->size += data->size;
303305

0 commit comments

Comments
 (0)