thor::Resources::RefCounted Struct Reference

Reference-counted ownership policy. More...

Detailed Description

Reference-counted ownership policy.

This ownership model is helpful when resources should remain allocated exactly as long as they are in use. Access to resources is granted through reference-counted shared pointers. One resource can be used by multiple shared_ptr objects; the last one being destroyed releases the resource. You must store a shared_ptr upon loading the resource, or it will be released immediately.

With this policy, the user accesses resources through std::shared_ptr<R> or std::shared_ptr<const R>.

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