]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/cocoa/checkbox.mm
fix memory leak while testing for correct Clone() implementation (closes #10304)
[wxWidgets.git] / src / osx / cocoa / checkbox.mm
index 0bca191ba836a67aac4c1b2856f617962e154fc5..8e79189ed1eef16421a4a733b0553bfad09dbe80 100644 (file)
@@ -25,8 +25,6 @@ wxWidgetImplType* wxWidgetImpl::CreateCheckBox( wxWindowMac* wxpeer,
                                     long style, 
                                     long extraStyle) 
 {
-    NSView* sv = (wxpeer->GetParent()->GetHandle() );
-    
     NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
     wxNSButton* v = [[wxNSButton alloc] initWithFrame:r];
 
@@ -34,7 +32,6 @@ wxWidgetImplType* wxWidgetImpl::CreateCheckBox( wxWindowMac* wxpeer,
     if (style & wxCHK_3STATE)
         [v setAllowsMixedState:YES];
         
-    [sv addSubview:v];
     wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v );
     [v setImplementation:c];
     return c;