Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
PinAndClear.cs
Go to the documentation of this file.
1using System;
3
5
6internal struct PinAndClear : IDisposable
7{
8 private byte[] _data;
9
11
12 internal static PinAndClear Track(byte[] data)
13 {
14 PinAndClear result = default(PinAndClear);
15 result._gcHandle = GCHandle.Alloc(data, GCHandleType.Pinned);
16 result._data = data;
17 return result;
18 }
19
20 public void Dispose()
21 {
24 }
25}
static unsafe void Clear(Array array)
Definition Array.cs:755
static PinAndClear Track(byte[] data)
static GCHandle Alloc(object? value)
Definition GCHandle.cs:81