BrawlCrate v0.41
Wii File Editor
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
BrawlLib.Internal.UnsafeBuffer Class Reference
Inheritance diagram for BrawlLib.Internal.UnsafeBuffer:

Public Member Functions

 UnsafeBuffer (int size)
 
void Dispose ()
 

Properties

VoidPtr Address [get]
 
int Length [get, set]
 
VoidPtr this[int count, int stride] [get]
 

Constructor & Destructor Documentation

◆ UnsafeBuffer()

BrawlLib.Internal.UnsafeBuffer.UnsafeBuffer ( int  size)
inline
20 {
21 _data = Marshal.AllocHGlobal(size);
22 _length = size;
23 }

Member Function Documentation

◆ Dispose()

void BrawlLib.Internal.UnsafeBuffer.Dispose ( )
inline
33 {
34 try
35 {
36 if (_data)
37 {
38 Marshal.FreeHGlobal(_data);
39 _data = null;
40 GC.SuppressFinalize(this);
41 }
42 }
43 catch (Exception e)
44 {
45 Console.WriteLine(e.ToString());
46 }
47 }

Property Documentation

◆ Address

VoidPtr BrawlLib.Internal.UnsafeBuffer.Address
get

◆ Length

int BrawlLib.Internal.UnsafeBuffer.Length
getset
14 {
15 get => _length;
16 set => _length = value;
17 }

◆ this[int count, int stride]

VoidPtr BrawlLib.Internal.UnsafeBuffer.this[int count, int stride]
get

The documentation for this class was generated from the following file: