private void HandleTargetInOut(List <Bio> targetsEnter, List <Bio> targetsExit) { if (targetsEnter != null) { int c1 = targetsEnter.Count; for (int i = 0; i < c1; i++) { Bio target = targetsEnter[i]; this.OnTargetEnter(target); LLogger.Info("enter"); target.AddRef(); } } if (targetsExit != null) { int count = targetsExit.Count; for (int i = 0; i < count; i++) { Bio target = targetsExit[i]; LLogger.Info("exit"); this.OnTargetExit(target); target.RedRef(); } } }
public void RedRef(bool log = true) { if (log) { LLogger.Info("[Red]{0}: {1}", this.rid, this.reference); } --this.reference; }
public void AddRef(bool log = true) { ++this.reference; if (log) { LLogger.Info("[Add]{0}: {1}", this.rid, this.reference); } }