ProcessController: Fix memory leak.

This commit is contained in:
Augustin Cavalier 2020-10-10 16:11:42 -04:00
parent f65814780e
commit b7fd72cdbb

View File

@ -102,10 +102,8 @@ PCApplication::ReadyToRun()
int32 count = list.CountItems();
if (count > 1) {
for (int32 i = 0; i < count - 1; i++) {
BMessenger* otherme = new BMessenger(NULL, (addr_t)list.ItemAt(i));
BMessage* message = new BMessage(B_QUIT_REQUESTED);
otherme->SendMessage(message);
delete otherme;
BMessenger otherme(NULL, (addr_t)list.ItemAt(i));
otherme.SendMessage(B_QUIT_REQUESTED);
}
}
}