Beispiel #1
0
        protected virtual void Dispose(bool disposing)
        {
            if (!m_Disposed)
            {
                if (m_NativePointer != IntPtr.Zero)
                {
#if !UNITY_WEBGL || UNITY_EDITOR
                    lock (PDFLibrary.nativeLock)
                    {
                        s_InstanceMap[m_NativePointer] = s_InstanceMap[m_NativePointer] - 1;

                        if (s_InstanceMap[m_NativePointer] == 0)
                        {
                            if (m_Document.NativePointer != IntPtr.Zero)
                            {
                                FPDF_ClosePage(m_NativePointer);
                            }
                            s_InstanceMap.Remove(m_NativePointer);
                            m_NativePointer = IntPtr.Zero;
                        }
                    }
#else
                    PDFJS_ClosePage(m_NativePointer.ToInt32());
                    m_NativePointer = IntPtr.Zero;
#endif
                }

                PDFLibrary.RemoveRef("PDFPage");

                m_Disposed = true;
            }
        }
        protected virtual void Dispose(bool disposing)
        {
            if (!m_Disposed)
            {
                lock (PDFLibrary.nativeLock)
                {
                    if (m_NativePointer != IntPtr.Zero)
                    {
                        s_InstanceMap[m_NativePointer] = s_InstanceMap[m_NativePointer] - 1;

                        if (s_InstanceMap[m_NativePointer] == 0)
                        {
                            if (m_Page.NativePointer != IntPtr.Zero && m_Page.Document.NativePointer != IntPtr.Zero)
                            {
                                FPDFText_ClosePage(m_NativePointer);
                            }
                            s_InstanceMap.Remove(m_NativePointer);
                            m_NativePointer = IntPtr.Zero;
                        }
                    }
                }

                PDFLibrary.RemoveRef("PDFTextPage");

                m_Disposed = true;
            }
        }
Beispiel #3
0
        protected virtual void Dispose(bool disposing)
        {
            if (!m_Disposed)
            {
                m_NativePointer = IntPtr.Zero;

                PDFLibrary.RemoveRef("PDFAction");

                m_Disposed = true;
            }
        }
Beispiel #4
0
        protected virtual void Dispose(bool disposing)
        {
            if (!m_Disposed)
            {
                if (disposing)
                {
#if !UNITY_WEBGL || UNITY_EDITOR
                    m_Bitmap.Dispose();
                    m_Bitmap = null;
#endif
                }

                PDFLibrary.RemoveRef("PDFRenderer");

                m_Disposed = true;
            }
        }
Beispiel #5
0
        protected virtual void Dispose(bool disposing)
        {
            if (!m_Disposed)
            {
                lock (PDFLibrary.nativeLock)
                {
                    if (m_NativePointer != IntPtr.Zero)
                    {
                        FPDFText_FindClose(m_NativePointer);
                        m_NativePointer = IntPtr.Zero;
                    }
                }

                PDFLibrary.RemoveRef("PDFSearchHandle");

                m_Disposed = true;
            }
        }
Beispiel #6
0
        protected virtual void Dispose(bool disposing)
        {
            if (!m_Disposed)
            {
                lock (PDFLibrary.nativeLock)
                {
                    if (m_NativePointer != IntPtr.Zero)
                    {
#if UNITY_WEBGL && !UNITY_EDITOR
                        PDFJS_CloseDocument(m_NativePointer.ToInt32());
#else
                        FPDF_CloseDocument(m_NativePointer);
#endif
                        m_NativePointer = IntPtr.Zero;
                    }
                }

                PDFLibrary.RemoveRef("PDFDocument");

                m_Disposed = true;
            }
        }