Beispiel #1
0
        protected override void derivedWashNode(MLink pLink)
        {
            Debug.Assert(pLink != null);
            DeathNode pNode = (DeathNode)pLink;

            pNode.WashNodeData();
        }
Beispiel #2
0
        protected override MLink derivedCreateNode()
        {
            MLink pNode = new DeathNode();

            Debug.Assert(pNode != null);

            return(pNode);
        }
Beispiel #3
0
        //----------------------------------------------------------------------
        // Override Abstract methods
        //----------------------------------------------------------------------

        //EDIT THE FOLLOWING METHODS---------------------
        protected override void derivedDestroyNode(MLink pLink)
        {
            DeathNode pNode = (DeathNode)pLink;

            #if (TRACK_DESTRUCTOR)
            if (pNode.pObject != null)
            {
                Debug.WriteLine("     {0} ({1})", pNode.pObject, pNode.pObject.GetHashCode());
            }
            #endif
            pNode.pObject = null;
        }
Beispiel #4
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 #5
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;
        }
Beispiel #6
0
        protected override Boolean derivedCompareNodes(MLink pLinkA, MLink pLinkB)
        {
            // This is used in baseFindNode()
            Debug.Assert(pLinkA != null);
            Debug.Assert(pLinkB != null);

            DeathNode pDataA = (DeathNode)pLinkA;
            DeathNode pDataB = (DeathNode)pLinkB;

            Boolean status = false;

            if (pDataA.pObject == pDataB.pObject)
            {
                status = true;
            }

            return(status);
        }