Page 1 of 1

OGRE_NEW

Posted: Thu Jun 19, 2014 4:40 pm
by Walta69
I am studying computer science and just out of general interest is OGRE_NEW a result of the new operator being overridden? :)

Re: OGRE_NEW

Posted: Thu Jun 19, 2014 5:08 pm
by spacegaier

Code: Select all

#define OGRE_NEW   new
Definition at line 474 of file OgreMemoryAllocatorConfig.h for Ogre 1.10.
OGRE_NEW - use to allocate an object which have custom new/delete operators
to handle custom allocations, usually this means it's derived from Ogre::AllocatedObject.
Free the memory using OGRE_DELETE. You can in fact use the regular new/delete
for these classes but you won't get any line number debugging if you do.
The memory category is automatically derived for these classes; for all other
allocations you have to specify it.