]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/utils.cpp
chain to the polling function GLib was using before we replaced it, eliminating all...
[wxWidgets.git] / src / mac / carbon / utils.cpp
index 8e7cf1af166845f06a250cd78b572f0b53783696..85a38d0b49f9b57b540423bc0217be4383404a80 100644 (file)
@@ -865,10 +865,8 @@ void wxMacControl::Dispose()
 {
     wxASSERT_MSG( IsValidControlHandle(m_controlRef) , wxT("Invalid Control Handle (maybe already released) in Dispose") );
 
-    CFIndex count = CFGetRetainCount( m_controlRef ) ;
-    wxASSERT_MSG( count == 1 , wxT("Reference Count of native control was not 1 in Dispose") );
-
-    ::DisposeControl( m_controlRef );
+    // we cannot check the ref count here anymore, as autorelease objects might delete their refs later
+    CFRelease(m_controlRef);
     m_controlRef = NULL;
 }