private void Dispose(bool disposing) { if (!disposed) { disposed = true; if (!duplicate) { Error err; if (parentLibrary != null) err = FT.FT_Outline_Done(parentLibrary.Reference, reference); else err = FT.FT_Outline_Done_Internal(parentMemory.Reference, reference); if (err != Error.Ok) throw new FreeTypeException(err); // removes itself from the parent Library, with a check to prevent this from happening when Library is // being disposed (Library disposes all it's children with a foreach loop, this causes an // InvalidOperationException for modifying a collection during enumeration) if (!parentLibrary.IsDisposed) parentLibrary.RemoveChildOutline(this); } reference = IntPtr.Zero; rec = default(OutlineRec); } }
internal Outline(IntPtr reference, OutlineRec outlineInt) { this.rec = outlineInt; this.reference = reference; duplicate = true; }
internal Outline(OutlineRec outlineInt) { this.rec = outlineInt; duplicate = true; }