// when this view is removed from the native toolbar its count gets decremented again
// and when the HITooolbarItem wrapper object gets destroyed it is decremented as well
// so in the end the control lives with a refcount of one and can be disposed of by the
// when this view is removed from the native toolbar its count gets decremented again
// and when the HITooolbarItem wrapper object gets destroyed it is decremented as well
// so in the end the control lives with a refcount of one and can be disposed of by the
if( viewRef && IsValidControlHandle( viewRef) )
{
// depending whether the wxControl corresponding to this HIView has already been destroyed or
if( viewRef && IsValidControlHandle( viewRef) )
{
// depending whether the wxControl corresponding to this HIView has already been destroyed or
if ( tool2->IsControl() )
{
CFIndex count = CFGetRetainCount( tool2->GetControl()->GetPeer()->GetControlRef() ) ;
if ( tool2->IsControl() )
{
CFIndex count = CFGetRetainCount( tool2->GetControl()->GetPeer()->GetControlRef() ) ;
wxASSERT( IsValidControlHandle(tool2->GetControl()->GetPeer()->GetControlRef() )) ;
}
err = HIToolbarRemoveItemAtIndex(refTB, idx);
wxASSERT( IsValidControlHandle(tool2->GetControl()->GetPeer()->GetControlRef() )) ;
}
err = HIToolbarRemoveItemAtIndex(refTB, idx);