Show / Hide Table of Contents

Class MatMemoryManager<T>

A MemoryManager over an OpenCvSharpMat

Inheritance
System.Object
System.Buffers.MemoryManager<T>
MatMemoryManager<T>
Implements
System.Buffers.IMemoryOwner<T>
System.IDisposable
System.Buffers.IPinnable
Inherited Members
System.Buffers.MemoryManager<T>.CreateMemory(System.Int32)
System.Buffers.MemoryManager<T>.CreateMemory(System.Int32, System.Int32)
System.Buffers.MemoryManager<T>.System.IDisposable.Dispose()
System.Buffers.MemoryManager<T>.TryGetArray(System.ArraySegment<T>)
System.Buffers.MemoryManager<T>.Memory
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: OpenCvSharp
Assembly: OpenCvSharp.dll
Syntax
public sealed class MatMemoryManager<T> : MemoryManager<T>, IMemoryOwner<T>, IDisposable, IPinnable where T : struct
Type Parameters
Name Description
T
Remarks

The pointer is assumed to be fully unmanaged, or externally pinned - no attempt will be made to pin this data

Constructors

| Improve this Doc View Source

MatMemoryManager(Mat, Boolean)

Create a new UnmanagedMemoryManager instance at the given pointer and size

Declaration
public MatMemoryManager(Mat mat, bool isDataOwner = true)
Parameters
Type Name Description
Mat mat
System.Boolean isDataOwner
Remarks

It is assumed that the span provided is already unmanaged or externally pinned

Methods

| Improve this Doc View Source

Dispose(Boolean)

Releases all resources associated with this object

Declaration
protected override void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing
Overrides
System.Buffers.MemoryManager<T>.Dispose(System.Boolean)
| Improve this Doc View Source

GetSpan()

Declaration
public override Span<T> GetSpan()
Returns
Type Description
Span<T>
Overrides
System.Buffers.MemoryManager<T>.GetSpan()
| Improve this Doc View Source

Pin(Int32)

Provides access to a pointer that represents the data (note: no actual pin occurs)

Declaration
public override MemoryHandle Pin(int elementIndex = 0)
Parameters
Type Name Description
System.Int32 elementIndex
Returns
Type Description
System.Buffers.MemoryHandle
Overrides
System.Buffers.MemoryManager<T>.Pin(System.Int32)
| Improve this Doc View Source

Unpin()

Has no effect

Declaration
public override void Unpin()
Overrides
System.Buffers.MemoryManager<T>.Unpin()

Implements

System.Buffers.IMemoryOwner<T>
System.IDisposable
System.Buffers.IPinnable
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX