diff --git a/src/ca/autoPtrRecycle.h b/src/ca/autoPtrRecycle.h index 0f4bf100a..73160af2c 100644 --- a/src/ca/autoPtrRecycle.h +++ b/src/ca/autoPtrRecycle.h @@ -21,7 +21,8 @@ template < class T > class autoPtrRecycle { public: - autoPtrRecycle ( cacRecycle &, T * ); + autoPtrRecycle ( chronIntIdResTable < baseNMIU > &, + tsDLList < class baseNMIU > &, cacRecycle &, T * ); ~autoPtrRecycle (); T & operator * () const; T * operator -> () const; @@ -30,17 +31,22 @@ public: private: T *p; cacRecycle &r; + tsDLList < class baseNMIU > &eventq; + chronIntIdResTable < baseNMIU > &ioTable; }; template < class T > -inline autoPtrRecycle::autoPtrRecycle ( cacRecycle &rIn, T *pIn ) : - p ( pIn ), r ( rIn ) {} +inline autoPtrRecycle::autoPtrRecycle ( chronIntIdResTable < baseNMIU > &tbl, + tsDLList < class baseNMIU > &list, cacRecycle &rIn, T *pIn ) : + p ( pIn ), r ( rIn ), eventq ( list ), ioTable ( tbl ) {} template < class T > inline autoPtrRecycle::~autoPtrRecycle () { if ( this->p ) { baseNMIU *pb = this->p; + this->ioTable.remove ( *pb ); + this->eventq.remove ( *pb ); pb->destroy ( this->r ); } }