Class MatSafeHandle
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
A OpenCvSafeHandle that releases a native cv::Mat* pointer.
public sealed class MatSafeHandle : OpenCvSafeHandle, IDisposable
- Inheritance
-
MatSafeHandle
- Implements
- Inherited Members
Constructors
MatSafeHandle()
Initializes a new owning instance (used by P/Invoke out parameters).
public MatSafeHandle()
MatSafeHandle(nint, bool)
Wraps an existing native cv::Mat* pointer.
public MatSafeHandle(nint existingHandle, bool ownsHandle)
Parameters
existingHandlenintThe pre-existing native pointer.
ownsHandlebooltrueif this instance should callcore_Mat_deleteon disposal;falsefor borrowed pointers that are owned by another object.
Methods
ReleaseHandle()
When overridden in a derived class, executes the code required to free the handle.
protected override bool ReleaseHandle()