- Don't leak the message given to BMessageRunner, thanks stippi!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27285 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
86dab989e5
commit
4a89dc95cb
@ -376,8 +376,8 @@ TTimeView::MouseDown(BPoint point)
|
||||
ShowClockOptions(ConvertToScreen(point));
|
||||
return;
|
||||
} else if (buttons == B_PRIMARY_MOUSE_BUTTON) {
|
||||
BMessage * longClickMessage = new BMessage(kMsgLongClick);
|
||||
longClickMessage->AddPoint("where", point);
|
||||
BMessage longClickMessage(kMsgLongClick);
|
||||
longClickMessage.AddPoint("where", point);
|
||||
|
||||
bigtime_t longClickThreshold;
|
||||
get_click_speed(&longClickThreshold);
|
||||
@ -385,7 +385,7 @@ TTimeView::MouseDown(BPoint point)
|
||||
|
||||
delete fLongClickMessageRunner;
|
||||
fLongClickMessageRunner = new BMessageRunner(BMessenger(this),
|
||||
longClickMessage, longClickThreshold, 1);
|
||||
&longClickMessage, longClickThreshold, 1);
|
||||
}
|
||||
|
||||
// flip to/from showing date or time
|
||||
|
@ -79,8 +79,9 @@ PairsWindow::MessageReceived(BMessage* message)
|
||||
// message of message runner might not have arrived
|
||||
// yet, so it is deleted here to prevent any leaking
|
||||
// just in case
|
||||
BMessage message(kMsgPairComparing);
|
||||
fPairComparing = new BMessageRunner(BMessenger(this),
|
||||
new BMessage(kMsgPairComparing), 5 * 100000L, 1);
|
||||
&message, 5 * 100000L, 1);
|
||||
fIsPairsActive = false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user