public TrackedFrame PopFrame() { if (CurrentTrackedFrame == null) { return(null); } TrackedFrame old = CurrentTrackedFrame; CurrentTrackedFrame = old.Prev; old.RemoveRefs(); return(old); }
static public bool cliTrackerFree(PlTerm trackerIn) { ThisThreadTracked--; TrackedFrame tc0 = (TrackedFrame)GetInstance(trackerIn); if (tc0 != null) { LocallyTrackedObjects.RemoveFrame(tc0); return(true); } return(false); }
public TrackedFrame CreateFrame() { if (CurrentTrackedFrame == null) { CurrentTrackedFrame = new TrackedFrame(); return(CurrentTrackedFrame); } TrackedFrame newTrackedFrame = new TrackedFrame { Prev = CurrentTrackedFrame }; CurrentTrackedFrame = newTrackedFrame; return(newTrackedFrame); }
public bool RemoveFrame(TrackedFrame frame) { if (CurrentTrackedFrame == frame) { PopFrame(); return(true); } else { if (PrologCLR.DebugRefs) { PrologCLR.Debug("Removing wierd frame{0}", frame); } frame.RemoveRefs(); return(false); } }
public ThreadEngineObjectTracker() { CurrentTrackedFrame = new TrackedFrame(); }