}
}
+ virtual void OnObjectDestroy()
+ {
+ // Tracked object itself removes us from list of trackers
+ wxASSERT(m_pobj != NULL);
+ m_pobj = NULL;
+ }
+
protected:
void Assign(T* pobj)
{
Assign( wr.m_pobj );
}
- virtual void OnObjectDestroy()
- {
- // Tracked object itself removes us from list of trackers
- wxASSERT( m_pobj!=NULL );
- m_pobj = NULL;
- }
-
T *m_pobj;
};
}
}
+ virtual void OnObjectDestroy()
+ {
+ // Tracked object itself removes us from list of trackers
+ wxASSERT(m_pobj != NULL);
+ m_pobj = NULL;
+ m_ptbase = NULL;
+ }
+
protected:
wxWeakRefImpl() : m_pobj(NULL), m_ptbase(NULL) { }
}
}
- virtual void OnObjectDestroy()
- {
- // Tracked object itself removes us from list of trackers
- wxASSERT( m_pobj!=NULL );
- m_pobj = NULL;
- m_ptbase = NULL;
- }
-
T *m_pobj;
wxTrackable *m_ptbase;
};
}
}
+ virtual void OnObjectDestroy()
+ {
+ wxASSERT_MSG(m_pobj, "tracked object should have removed us itself");
+
+ m_pobj = NULL;
+ }
+
protected:
void Assign(T *pobj)
{
}
}
- virtual void OnObjectDestroy()
- {
- wxASSERT_MSG( m_pobj, "tracked object should have removed us itself" );
-
- m_pobj = NULL;
- }
-
T *m_pobj;
};