V-ART
|
A "Memory Object" is a V-ART object that has some memory allocation attributes, allowing V-ART to auto deallocate its memory space. More...
#include <memoryobj.h>
Public Member Functions | |
MemoryObj () | |
Default constructor. More... | |
MemoryObj (const VART::MemoryObj &obj) | |
Copy constructor. More... | |
Public Attributes | |
bool | autoDelete |
A "Memory Object" is a V-ART object that has some memory allocation attributes, allowing V-ART to auto deallocate its memory space.
A V-ART program typically needs to allocate memory for several scene objects that should be deallocated upon application exit. V-ART code typically follows the rule that memory allocated by the programmer should be deallocated by her, while memory allocated by itself should be deallocated by itself. However, creating lots of graphical objects, joints and DOFs, and keeping track of their memory positions is tedious hard work, that may be avoided using some kind of memory management. The use of the autoDelete flag helps creating a fast, user-controlled memory management.
Definition at line 27 of file memoryobj.h.
VART::MemoryObj::MemoryObj | ( | ) |
Default constructor.
Initializes the autoDelete flag with false, i.e.: all Memory Objects arent deallocated by default upon application termination.
Definition at line 10 of file memoryobj.cpp.
References autoDelete.
VART::MemoryObj::MemoryObj | ( | const VART::MemoryObj & | obj | ) |
Copy constructor.
Initialize the autoDelete flag with the same value of obj, i.e.: the new memory objects are deallocated if the original object are deallocated.
Definition at line 15 of file memoryobj.cpp.
bool VART::MemoryObj::autoDelete |
Definition at line 40 of file memoryobj.h.
Referenced by VART::Scene::AddLight(), VART::XmlScene::loadDofs(), VART::XmlScene::LoadMeshFromFile(), VART::XmlScene::LoadSceneNode(), MemoryObj(), and VART::MeshObject::ReadFromOBJ().