]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/cocoa/slider.mm
fix memory leak while testing for correct Clone() implementation (closes #10304)
[wxWidgets.git] / src / osx / cocoa / slider.mm
index a80fb434d6a7eff9aa8ec7c26786a5baca4d359e..8fc664c26c5798226e57245d02b37c0994fd4318 100644 (file)
@@ -77,8 +77,6 @@ wxWidgetImplType* wxWidgetImpl::CreateSlider( wxWindowMac* wxpeer,
                                     long style, 
                                     long extraStyle)
 {
-    NSView* sv = (wxpeer->GetParent()->GetHandle() );
-    
     NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
     wxNSSlider* v = [[wxNSSlider alloc] initWithFrame:r];
 
@@ -99,7 +97,6 @@ wxWidgetImplType* wxWidgetImpl::CreateSlider( wxWindowMac* wxpeer,
     [v setMinValue: minimum];
     [v setMaxValue: maximum];
     [v setFloatValue: (double) value];
-    [sv addSubview:v];
     wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v );
     [v setImplementation:c];
     return c;