Class PdfObject
This class is the base class for all PDFium objects. It implements IDisposable to ensure proper resource management.
public abstract class PdfObject : IDisposable
- Inheritance
-
PdfObject
- Implements
- Derived
- Inherited Members
Constructors
PdfObject(nint, PdfObjectType)
Base class constructor. This constructor is protected and should not be used directly.
protected PdfObject(nint handle, PdfObjectType type)
Parameters
handle
ninttype
PdfObjectType
Fields
_disposed
protected bool _disposed
Field Value
_handle
protected nint _handle
Field Value
_type
protected PdfObjectType _type
Field Value
Properties
Handle
public nint Handle { get; }
Property Value
IsDisposed
public bool IsDisposed { get; }
Property Value
Type
public PdfObjectType Type { get; }
Property Value
Methods
Dispose()
Releases the resources used by this instance of the PdfObject class.
public virtual void Dispose()
Dispose(bool)
Releases the resources used by the current instance of the class.
protected virtual void Dispose(bool disposing)
Parameters
disposing
boolAre we disposing managed objects?
Remarks
This method should be called when the instance is no longer needed to free unmanaged resources. It ensures that any associated native resources are properly released based on the type of the object.
Exceptions
- InvalidOperationException
Thrown if the object type is not supported for disposal.
~PdfObject()
Base class destructor. This destructor is here for the IDisposable pattern.
protected ~PdfObject()
GetPDFiumError()
Returns the last error message from PDFium.
public static string GetPDFiumError()