| 89 | //----------------------------------------------------------------------------- |
| 90 | |
| 91 | void EngineObject::destroySelf() |
| 92 | { |
| 93 | if( !engineAPI::gUseConsoleInterop ) |
| 94 | AssertFatal( !getRefCount() || TYPEOF( this )->isDisposable(), "EngineObject::destroySelf - object still referenced!" ); |
| 95 | |
| 96 | // Call the internal _destroySelf(). |
| 97 | |
| 98 | _destroySelf(); |
| 99 | |
| 100 | // Destruct the object and release it in the pool. |
| 101 | |
| 102 | IEngineObjectPool* pool = this->mEngineObjectPool; |
| 103 | void* object = this; |
| 104 | |
| 105 | destructInPlace( this ); |
| 106 | if( pool ) |
| 107 | pool->freeObject( object ); |
| 108 | } |
| 109 | |
| 110 | //----------------------------------------------------------------------------- |
| 111 |
nothing calls this directly
no test coverage detected