Trait physx::base::RefCounted
source · pub trait RefCounted: Class<PxRefCounted> + Sized {
// Provided methods
fn release(&mut self) { ... }
fn get_reference_count(&self) -> u32 { ... }
fn acquire_reference(&mut self) { ... }
}
Provided Methods§
sourcefn release(&mut self)
fn release(&mut self)
Decrements the reference count of the object and releases it if the new reference count is zero.
sourcefn get_reference_count(&self) -> u32
fn get_reference_count(&self) -> u32
Returns the reference count of the object.
At creation, the reference count of the object is 1. Every other object referencing this object increments the count by 1. When the reference count reaches 0, and only then, the object gets destroyed automatically.
sourcefn acquire_reference(&mut self)
fn acquire_reference(&mut self)
Acquires a counted reference to this object.
This method increases the reference count of the object by 1. Decrement
the reference count by calling Self::release