+wxCocoaNSWindow::wxCocoaNSWindow(wxTopLevelWindowCocoa *tlw)
+: m_wxTopLevelWindowCocoa(tlw)
+{
+ m_cocoaDelegate = [[wxNSWindowDelegate alloc] init];
+ [m_cocoaDelegate setWxCocoaInterface: this];
+}
+
+wxCocoaNSWindow::~wxCocoaNSWindow()
+{
+ [m_cocoaDelegate setWxCocoaInterface: NULL];
+ [m_cocoaDelegate release];
+}