Tracker: Delete own BTextWidgets in BPose destructor.

Fixes a memory leak, and #12393.
This commit is contained in:
Augustin Cavalier 2015-10-21 11:26:18 -04:00
parent 2fc325944b
commit c746acc289

View File

@ -120,6 +120,12 @@ BPose::~BPose()
if (gPeriodicUpdatePoses.RemovePose(this, (void**)&volume))
delete volume;
}
int32 count = fWidgetList.CountItems();
for (int32 i = 0; i < count; i++) {
BTextWidget* widget = fWidgetList.ItemAt(i);
if (widget != NULL)
delete widget;
}
delete fModel;
}