protected override void derivedWashNode(MLink pLink) { Debug.Assert(pLink != null); DeathNode pNode = (DeathNode)pLink; pNode.WashNodeData(); }
protected override MLink derivedCreateNode() { MLink pNode = new DeathNode(); Debug.Assert(pNode != null); return(pNode); }
//---------------------------------------------------------------------- // 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; }
//---------------------------------------------------------------------- // 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); }
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; }
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); }