Class OpenCvSafeHandle
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
Base class for SafeHandle instances wrapping native OpenCV pointers.
Provides a common SafeHandle implementation where IntPtr.Zero is the invalid handle value.
public abstract class OpenCvSafeHandle : SafeHandle, IDisposable
- Inheritance
-
OpenCvSafeHandle
- Implements
- Derived
- Inherited Members
Constructors
- OpenCvSafeHandle()
Initializes a new instance of the OpenCvSafeHandle class that owns the handle.
- OpenCvSafeHandle(bool)
Initializes a new instance of the OpenCvSafeHandle class.
- OpenCvSafeHandle(nint, bool)
Initializes a new instance of the OpenCvSafeHandle class with an existing handle.
Properties
- IsInvalid
When overridden in a derived class, gets a value indicating whether the handle value is invalid.
- Null
A non-owning handle wrapping a null native pointer. Pass this for an optional SafeHandle-typed P/Invoke argument (e.g. a mask) when the caller has none, instead of overloading the parameter type with a plain nint.
Methods
- RunPostReleaseAction()
Runs and clears the registered post-release cleanup without allowing an exception to escape the SafeHandle critical-finalizer path.