/// <summary> /// Releases all resources used by the Ghostscript.NET.GhostscriptInterpreter instance. /// </summary> protected virtual void Dispose(bool disposing) { if (!_disposed) { if (disposing) { // GSAPI: exit the interpreter _gs.gsapi_exit(_gs_instance); // GSAPI: destroy an instance of Ghostscript _gs.gsapi_delete_instance(_gs_instance); // release all resource used by Ghostscript library _gs.Dispose(); } // check if the display device callback handler is attached if (_displayDevice_callback_handle != IntPtr.Zero) { // free earlier allocated memory used for the display device callback Marshal.FreeCoTaskMem(_displayDevice_callback_handle); } _disposed = true; } }
protected virtual void Dispose(bool disposing) { if (!_disposed) { if (disposing) { _gs.Dispose(); } _disposed = true; } }
protected virtual void Dispose(bool disposing) { if (!_disposed) { if (disposing) { if (_processorOwnsLibrary) { _gs.Dispose(); } } _disposed = true; } }
protected virtual void Dispose(bool disposing) { if (!_disposed) { if (disposing) { _gs.gsapi_exit(_gs_instance); _gs.gsapi_delete_instance(_gs_instance); _gs.Dispose(); } if (_displayDevice_callback_handle != IntPtr.Zero) { Marshal.FreeCoTaskMem(_displayDevice_callback_handle); } _disposed = true; } }