public virtual byte[] SerializeUserdata(T value)
public virtual IntPtr SerializeUserdata(T value, bool destroy = true)
Serialize arbitary userdata
Parameters#
Name | Type | Description |
---|
value | <T> | byte array data of value |
destroy | Boolean | true to call the DestroyStructure(IntPtr, Type) method. |
Returns#
Type | Description |
---|
Byte[] | byte array representation of userdata value |
IntPtr | |
Variants#
SerializeUserdata(value)#
public virtual byte[] SerializeUserdata(T value)
Serialize arbitary userdata
Parameters#
Name | Type | Description |
---|
value | <T> | byte array data of value |
Returns#
Type | Description |
---|
Byte[] | byte array representation of userdata value |
SerializeUserdata(value, destroy)#
public virtual IntPtr SerializeUserdata(T value, bool destroy = true)
Serialize arbitary userdata
Warning
When the memory block already contains data and destroy
is false
can lead to a memory leak
Parameters#
Name | Type | Description |
---|
value | <T> | object data of value |
destroy | Boolean | true to call the DestroyStructure(IntPtr, Type) method. |
Returns#