public void Dispose() { if (wrapper != null) { wrapper.Dispose(); wrapper = null; } }
private void CreateWrapper() { var handle = IntPtr.Zero; if (File.Exists(FilePath)) { // utf8 string with terminating zero lock (staticLock) handle = MuPDFLib.LoadDocument(Encoding.UTF8.GetBytes(FilePath + "\0")); } wrapper = new PDFDocumentWrapper(handle); }