From 56d17f07b9aa540824014498c99db3c8e21d9e31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sun, 12 Mar 2006 12:33:56 +0000 Subject: [PATCH] Now uses the new BMessageRunner form when built for Haiku, and thus, no longer leaks them. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16731 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/preferences/filetypes/MimeTypeListView.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/preferences/filetypes/MimeTypeListView.cpp b/src/preferences/filetypes/MimeTypeListView.cpp index 006ea828e2..4110028e3a 100644 --- a/src/preferences/filetypes/MimeTypeListView.cpp +++ b/src/preferences/filetypes/MimeTypeListView.cpp @@ -532,6 +532,11 @@ MimeTypeListView::MessageReceived(BMessage* message) BMessage addType(kMsgAddType); addType.AddString("type", type); +#ifdef __HAIKU + BMessageRunner runner(this, &addType, 200000ULL, 1, true); + if (runner.InitCheck() != B_OK) + _AddNewType(type); +#else // TODO: free runner again! BMessageRunner* runner = new BMessageRunner(this, &addType, 200000ULL, 1); @@ -539,6 +544,7 @@ MimeTypeListView::MessageReceived(BMessage* message) delete runner; _AddNewType(type); } +#endif break; } case B_MIME_TYPE_DELETED: