Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
MemoryHandle.cs
Go to the documentation of this file.
2
3namespace System.Buffers;
4
5public struct MemoryHandle : IDisposable
6{
7 private unsafe void* _pointer;
8
10
12
13 [CLSCompliant(false)]
14 public unsafe void* Pointer => _pointer;
15
16 [CLSCompliant(false)]
17 public unsafe MemoryHandle(void* pointer, GCHandle handle = default(GCHandle), IPinnable? pinnable = null)
18 {
21 _pinnable = pinnable;
22 }
23
24 public unsafe void Dispose()
25 {
27 {
28 _handle.Free();
29 }
30 if (_pinnable != null)
31 {
33 _pinnable = null;
34 }
35 _pointer = null;
36 }
37}
unsafe MemoryHandle(void *pointer, GCHandle handle=default(GCHandle), IPinnable? pinnable=null)