public Chip2D() { SwigObject = Engine.ObjectSystemFactory.CreateChip2D(); var p = SwigObject.GetPtr(); if (GC.Shapes.GetObject(p) != null) { Particular.Helper.ThrowException(""); } GC.Chip2Ds.AddObject(p, this); }
public Chip2D() { CoreInstance = Engine.ObjectSystemFactory.CreateChip2D(); var p = CoreInstance.GetPtr(); if (GC.Chip2Ds.Contains(p)) { Particular.Helper.ThrowException(""); } GC.Chip2Ds.AddObject(p, this); }
protected virtual void Dispose(bool disposing) { if (disposed) { return; } var core = CoreInstance; if (core != null) { GC.Collector.AddObject(core); CoreInstance = null; } disposed = true; }
public void Destroy() { lock (this) { if (SwigObject == null) return; GC.Collector.AddObject(SwigObject); SwigObject = null; } Particular.GC.SuppressFinalize(this); }