Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
AbstractMemoryBlock.cs
Go to the documentation of this file.
3
5
6internal abstract class AbstractMemoryBlock : IDisposable
7{
8 public unsafe abstract byte* Pointer { get; }
9
10 public abstract int Size { get; }
11
12 public unsafe BlobReader GetReader()
13 {
14 return new BlobReader(Pointer, Size);
15 }
16
17 public unsafe virtual ImmutableArray<byte> GetContentUnchecked(int start, int length)
18 {
20 GC.KeepAlive(this);
21 return result;
22 }
23
24 public abstract void Dispose();
25}
static void KeepAlive(object? obj)
Definition GC.cs:180
Definition GC.cs:8
static unsafe ImmutableArray< byte > ReadImmutableBytes(byte *buffer, int byteCount)
virtual unsafe ImmutableArray< byte > GetContentUnchecked(int start, int length)