- wxDLManifestEntry *Ref() { ++m_count; return this; }
- bool Unref() { return (m_count-- < 2) ? (delete this, TRUE) : FALSE; }
+ wxDLManifestEntry *RefLib() { ++m_linkcount; return this; }
+ bool UnrefLib();
+
+ // These two are called by the PluginSentinel on (PLUGGABLE) object
+ // creation/destruction. There is usually no reason for the user to
+ // call them directly. We have to separate this from the link count,
+ // since the two are not interchangeable.
+
+ // FIXME: for even better debugging PluginSentinel should register
+ // the name of the class created too, then we can state
+ // exactly which object was not destroyed which may be
+ // difficult to find otherwise. Also this code should
+ // probably only be active in DEBUG mode, but let's just
+ // get it right first.
+
+ void RefObj() { ++m_objcount; }
+ void UnrefObj()
+ {
+ wxASSERT_MSG( m_objcount > 0, _T("Too many objects deleted??") );
+ --m_objcount;
+ }