struct
ResourceHandleData
Data that is shared between all resource handles.
Public
Constructors
ResourceHandleData
ResourceHandleData
Methods
IncrementStrongReferenceCount
Increments the strong reference count.
As long as strong reference count is non-zero the handle will keep the managed resource alive.
DecrementStrongReferenceCount
Decrements the strong reference count.
If the strong reference count reaches zero the managed resource will be destroyed. Additionally if there are no weak resource handles alive either, resource handle data will also be destroyed.
IncrementWeakReferenceCount
Increments the weak reference count.
This keeps the resource handle data alive, but not the managed resource itself.
DecrementWeakReferenceCount
Decrements the weak reference count.
If this was the last weak reference and there are no strong references either, handle data will be destroyed.
IncrementStrongReferenceCountIfNonZero
Increments the strong reference count, but only if it is not already at zero.
Returns true if incremented.
DestroyManagedResource
Destroys the resource the handle is pointing to.
DestroySelf
Destroys the handle data.
Fields
Object
Id
IsCreated
StrongReferenceCount
References keeping the resource alive (strong handles).
WeakReferenceCount
References keeping the resource handle data alive (weak handles + 1 if any strong handle is alive).