protected virtual void Dispose(bool disposing) { if (!m_Disposed) { lock (PDFLibrary.nativeLock) { if (m_NativePointer != IntPtr.Zero) { FPDFBitmap_Destroy(m_NativePointer); } m_NativePointer = IntPtr.Zero; } PDFLibrary.RemoveRef("PDFBitmap"); m_Disposed = true; } }