[haiku-development] Re: BFilePanel: Undefined reference to..
- From: Stephan Assmus <superstippi@xxxxxx>
- To: haiku-development@xxxxxxxxxxxxx
- Date: Tue, 15 Jul 2008 13:32:14 +0200
Hi James,
James Kim wrote:
> void
> EditForm::MessageReceived(BMessage* message)
> {
> switch (message->what) {
> ...
> case M_SAVE_DIALOG: {
> if (!fPanel) {
> fPanel = new BFilePanel(B_SAVE_PANEL, new BMessenger(this)); ...
Unfortunately the BeBook is not explicit about it and the API isn't helpful
either, it should have been "const BMessenger* target"... the above code
will leak the BMessenger created with "new". Correct would be:
> BMessenger target(this);
> fPanel = new BFilePanel(B_SAVE_PANEL, &target); ...
Best regards,
-Stephan
- Follow-Ups:
- [haiku-development] Re: BFilePanel: Undefined reference to..
- From: James Kim
- References:
- [haiku-development] BFilePanel: Undefined reference to..
- From: James Kim
Other related posts:
- » [haiku-development] BFilePanel: Undefined reference to..
- » [haiku-development] Re: BFilePanel: Undefined reference to..
- » [haiku-development] Re: BFilePanel: Undefined reference to..
- » [haiku-development] Re: BFilePanel: Undefined reference to..
- » [haiku-development] Re: BFilePanel: Undefined reference to..
- [haiku-development] Re: BFilePanel: Undefined reference to..
- From: James Kim
- [haiku-development] BFilePanel: Undefined reference to..
- From: James Kim