]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/NSMenu.mm
Restore a use case that was lost with the last set of updates, using a
[wxWidgets.git] / src / cocoa / NSMenu.mm
index 43108ad7d692e524959302c2687766bc492dcfbf..ef19045c4502460691423c933cd81fc892bb6157 100644 (file)
 #endif // WX_PRECOMP
 
 #include "wx/cocoa/NSMenu.h"
-//#include "wx/cocoa/ObjcPose.h"
+#include "wx/cocoa/ObjcPose.h"
 
 #import <Foundation/NSNotification.h>
 #import <AppKit/NSMenu.h>
 
-#if 0 // There is no reason to pose for NSMenu at this time.
 // ============================================================================
 // @class wxPoserNSMenu
 // ============================================================================
 {
 }
 
+- (void)dealloc;
+
 @end // wxPoserNSMenu
 
 WX_IMPLEMENT_POSER(wxPoserNSMenu);
 @implementation wxPoserNSMenu : NSMenu
 
+- (void)dealloc
+{
+    wxCocoaNSMenu *menu = wxCocoaNSMenu::GetFromCocoa(self);
+    if(menu)
+        menu->Cocoa_dealloc();
+    [super dealloc];
+}
+
 @end // wxPoserNSMenu
-#endif // 0
 
 // ============================================================================
 // @class wxNSMenuNotificationObserver