Tracker: Delete own BTextWidgets in BPose destructor.
Fixes a memory leak, and #12393.
This commit is contained in:
parent
2fc325944b
commit
c746acc289
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user