DHART
Loading...
Searching...
No Matches
DHARTAPI.NativeUtils.NativeObject Class Reference

An object that holds a pointer to unmanaged memory or some other resource that must be freed. More...

+ Inheritance diagram for DHARTAPI.NativeUtils.NativeObject:

Public Member Functions

void UpdatePressure (int new_pressure)
 Update the pressure of this object.
 

Public Attributes

int pressure
 the size of the object pointed to in unmanaged memory in bytes. Used to exert pressure on the GC. More...
 

Properties

override bool IsInvalid [get]
 There is no way to invalidate this class without destroying it, so will always return false.
 

Detailed Description

An object that holds a pointer to unmanaged memory or some other resource that must be freed.

An implementation of Safehandle, able to report it'ssize to the garbage collector to improve performance.

Remarks
All uses of pointers to native objects in this library will be wrapped by this, since it ensures that no memory is leaked under any circumstances (providing that the implementation of native functionality is correct).

Member Data Documentation

◆ pressure

int DHARTAPI.NativeUtils.NativeObject.pressure

the size of the object pointed to in unmanaged memory in bytes. Used to exert pressure on the GC.

While not mandatory, accurately setting this will improve the performance of the garbage collector.

Referenced by DHARTAPI.RayTracing.EmbreeBVH.AddMesh(), and DHARTAPI.RayTracing.EmbreeBVH.EmbreeBVH().


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