OGRE_NEW

Get answers to all your basic programming questions. No Ogre questions, please!
Post Reply
Walta69
Halfling
Posts: 62
Joined: Sun May 11, 2014 5:49 pm

OGRE_NEW

Post by Walta69 » Thu Jun 19, 2014 4:40 pm

I am studying computer science and just out of general interest is OGRE_NEW a result of the new operator being overridden? :)
0 x

User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4291
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 2
Contact:

Re: OGRE_NEW

Post by spacegaier » Thu Jun 19, 2014 5:08 pm

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.
0 x
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...

Post Reply