Beispiel #1
0
        //----------------------------------------------------------------------
        // Unique Private helper methods
        //----------------------------------------------------------------------


        public static DeathNode Attach(object pObj)
        {
            DeathManager pMan = DeathManager.privGetInstance();

            DeathNode pNode = (DeathNode)pMan.baseAddToFront();

            Debug.Assert(pNode != null);

            Debug.Assert(pObj != null);
            pNode.Set(pObj);
            return(pNode);
        }
Beispiel #2
0
        public static void Destroy()
        {
            // Get the instance
            DeathManager pMan = DeathManager.privGetInstance();

            Debug.WriteLine("--->DeathMan.Destroy()");
            pMan.baseDestroy();

#if (TRACK_DESTRUCTOR)
            Debug.WriteLine("     {0} ({1})", DeathMan.pDeathNodeRef, DeathMan.pDeathNodeRef.GetHashCode());
            Debug.WriteLine("     {0} ({1})", DeathMan.pInstance, DeathMan.pInstance.GetHashCode());
#endif
            DeathManager.pDeathNodeRef = null;
            DeathManager.pInstance     = null;
        }