but leave m_cocoaNSView intact so base class destructors can use it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21908 
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
 
 wxBitmapButton::~wxBitmapButton()
 {
 
 wxBitmapButton::~wxBitmapButton()
 {
-    CocoaRemoveFromParent();
-    SetNSButton(NULL);
+    DisassociateNSButton(m_cocoaNSView);
 }
 
 void wxBitmapButton::Cocoa_wxNSButtonAction(void)
 }
 
 void wxBitmapButton::Cocoa_wxNSButtonAction(void)
 
-    CocoaRemoveFromParent();
-    SetNSButton(NULL);
+    DisassociateNSButton(m_cocoaNSView);
 }
 
 void wxButton::Cocoa_wxNSButtonAction(void)
 }
 
 void wxButton::Cocoa_wxNSButtonAction(void)
 
 
 wxCheckBox::~wxCheckBox()
 {
 
 wxCheckBox::~wxCheckBox()
 {
-    CocoaRemoveFromParent();
-    SetNSButton(NULL);
+    DisassociateNSButton(m_cocoaNSView);
 }
 
 void wxCheckBox::SetValue(bool)
 }
 
 void wxCheckBox::SetValue(bool)
 
 
 wxControl::~wxControl()
 {
 
 wxControl::~wxControl()
 {
-    CocoaRemoveFromParent();
-    SetNSControl(NULL);
+    DisassociateNSControl(m_cocoaNSView);
 }
 
 wxSize wxControl::DoGetBestSize() const
 }
 
 wxSize wxControl::DoGetBestSize() const
 
 
 wxRadioButton::~wxRadioButton()
 {
 
 wxRadioButton::~wxRadioButton()
 {
-    CocoaRemoveFromParent();
-    SetNSButton(NULL);
+    DisassociateNSButton(m_cocoaNSView);
 }
 
 void wxRadioButton::SetValue(bool)
 }
 
 void wxRadioButton::SetValue(bool)
 
 
 wxStaticBox::~wxStaticBox()
 {
 
 wxStaticBox::~wxStaticBox()
 {
-    CocoaRemoveFromParent();
-    SetNSBox(NULL);
+    DisassociateNSBox(m_cocoaNSView);
 }
 
 void wxStaticBox::GetBordersForSizer(int *borderTop, int *borderOther) const
 }
 
 void wxStaticBox::GetBordersForSizer(int *borderTop, int *borderOther) const
 
 
 wxStaticText::~wxStaticText()
 {
 
 wxStaticText::~wxStaticText()
 {
-    CocoaRemoveFromParent();
-    SetNSTextField(NULL);
+    DisassociateNSTextField(m_cocoaNSView);
 }
 
 void wxStaticText::SetLabel(const wxString& label)
 }
 
 void wxStaticText::SetLabel(const wxString& label)
 
 
 wxTextCtrl::~wxTextCtrl()
 {
 
 wxTextCtrl::~wxTextCtrl()
 {
-    CocoaRemoveFromParent();
-    SetNSTextField(NULL);
+    DisassociateNSTextField(m_cocoaNSView);
 }
 
 void wxTextCtrl::Cocoa_didChangeText(void)
 }
 
 void wxTextCtrl::Cocoa_didChangeText(void)