From c1a10c140cda005384730ffea66caedec5a3b2c4 Mon Sep 17 00:00:00 2001 From: Karsten Heimrich Date: Fri, 3 Oct 2008 12:32:52 +0000 Subject: [PATCH] * fix mem leak git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27856 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/showimage/ShowImageWindow.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/apps/showimage/ShowImageWindow.cpp b/src/apps/showimage/ShowImageWindow.cpp index 73890c844c..bb30a81932 100644 --- a/src/apps/showimage/ShowImageWindow.cpp +++ b/src/apps/showimage/ShowImageWindow.cpp @@ -898,14 +898,14 @@ ShowImageWindow::SaveAs(BMessage *message) // Add the chosen translator and output type to the // message that the save panel will send back - BMessage *panelMsg = new BMessage(MSG_SAVE_PANEL); - panelMsg->AddInt32(kTranslatorField, outTranslator); - panelMsg->AddInt32(kTypeField, outType); + BMessage panelMsg(MSG_SAVE_PANEL); + panelMsg.AddInt32(kTranslatorField, outTranslator); + panelMsg.AddInt32(kTypeField, outType); // Create save panel and show it BMessenger target(this); fSavePanel = new (std::nothrow) BFilePanel(B_SAVE_PANEL, - &target, NULL, 0, false, panelMsg); + &target, NULL, 0, false, &panelMsg); if (!fSavePanel) return;