From 6ecf4dcbfa73dd7f02a8dca99e16c4acbbd7d3b7 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 25 Dec 2014 01:32:19 +0000 Subject: [PATCH] Fix removing tools from wxToolBar in wxOSX. Release the tool instead of retaining it (typo?) and also remove it from the toolbar view. See #16663. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78320 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/cocoa/toolbar.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/osx/cocoa/toolbar.mm b/src/osx/cocoa/toolbar.mm index fe9f839e7c..1dc3f824b9 100644 --- a/src/osx/cocoa/toolbar.mm +++ b/src/osx/cocoa/toolbar.mm @@ -114,7 +114,8 @@ public: { if ( !IsControl() ) { - [m_controlHandle retain]; + [m_controlHandle removeFromSuperview]; + [m_controlHandle release]; } else {