-
-// ----------------------------------------------------------------------------
-// wxEventConnectionRef
-// ----------------------------------------------------------------------------
-
-// Below functions are mostly short but kept in cpp file to simplify setting
-// breakpoints (GDB)
-wxEventConnectionRef::wxEventConnectionRef(wxEvtHandler *src, wxEvtHandler *sink)
- : m_src(src), m_sink(sink), m_refCount(1)
-{
- wxASSERT( m_sink );
- m_sink->AddNode( this );
-}
-
-wxEventConnectionRef::~wxEventConnectionRef()
-{
-}
-
-void wxEventConnectionRef::OnObjectDestroy( )
-{
- if( m_src )
- m_src->OnSinkDestroyed( m_sink );
- // It is safe to delete this tracker object here
- delete this;
-}
-
-void wxEventConnectionRef::DecRef( )
-{
- if( !--m_refCount )
- {
- // The sink holds the only external pointer to this object
- if( m_sink )
- m_sink->RemoveNode(this);
- delete this;
- }
-}
-
-