| 120 | |
| 121 | #ifndef TORQUE_DISABLE_MEMORY_MANAGER |
| 122 | void* EngineObject::operator new( size_t size ) |
| 123 | { |
| 124 | AssertFatal( IEngineObjectPool::DEFAULT, "EngineObject::new - No default pool set!" ); |
| 125 | |
| 126 | void* ptr = IEngineObjectPool::DEFAULT->allocateObject( size TORQUE_TMM_LOC ); |
| 127 | if( !ptr ) |
| 128 | { |
| 129 | Platform::AlertOK( "Torque Memory Error", "Out of memory. Shutting down.\n"); |
| 130 | Platform::forceShutdown( -1 ); |
| 131 | } |
| 132 | |
| 133 | EngineObject* object = reinterpret_cast< EngineObject* >( ptr ); |
| 134 | object->mEngineObjectPool = IEngineObjectPool::DEFAULT; |
| 135 | |
| 136 | return ptr; |
| 137 | } |
| 138 | #endif |
| 139 | |
| 140 | //----------------------------------------------------------------------------- |
nothing calls this directly
no test coverage detected