public void DecRefCount(StackValue sv) { if (!StackUtils.IsReferenceType(sv)) { return; } int ptr = (int)sv.opdata; Debug.Assert(this.Heaplist[ptr].Refcount > 0); this.Heaplist[ptr].Refcount--; }
public bool IsTemporaryPointer(StackValue sv) { if (!StackUtils.IsReferenceType(sv)) { return(false); } int ptr = (int)sv.opdata; HeapElement he = this.Heaplist[ptr]; return(he.Active && he.Refcount == 0); }
public void IncRefCount(StackValue sv) { if (!StackUtils.IsReferenceType(sv)) { return; } int ptr = (int)sv.opdata; this.Heaplist[ptr].Refcount++; if (this.Heaplist[ptr].Refcount > 0) { this.Heaplist[ptr].Active = true; } }