| 108 | //----------------------------------------------------------------------------- |
| 109 | |
| 110 | SimObject::~SimObject() |
| 111 | { |
| 112 | // if this is a temp-clone, we don't delete any members that were shallow-copied |
| 113 | // over from the source datablock. |
| 114 | if (is_temp_clone) |
| 115 | return; |
| 116 | if( mFieldDictionary ) |
| 117 | { |
| 118 | delete mFieldDictionary; |
| 119 | mFieldDictionary = NULL; |
| 120 | } |
| 121 | |
| 122 | // Release persistent ID. |
| 123 | if( mPersistentId ) |
| 124 | { |
| 125 | mPersistentId->unresolve(); |
| 126 | mPersistentId->decRefCount(); |
| 127 | mPersistentId = NULL; |
| 128 | } |
| 129 | |
| 130 | if( mCopySource ) |
| 131 | mCopySource->unregisterReference( &mCopySource ); |
| 132 | |
| 133 | AssertFatal(nextNameObject == nullptr,avar( |
| 134 | "SimObject::~SimObject: Not removed from dictionary: name %s, id %i", |
| 135 | mObjectName, mId)); |
| 136 | AssertFatal(nextManagerNameObject == nullptr,avar( |
| 137 | "SimObject::~SimObject: Not removed from manager dictionary: name %s, id %i", |
| 138 | mObjectName,mId)); |
| 139 | AssertFatal(mFlags.test(Added) == 0, "SimObject::object " |
| 140 | "missing call to SimObject::onRemove"); |
| 141 | } |
| 142 | |
| 143 | //----------------------------------------------------------------------------- |
| 144 |
nothing calls this directly
no test coverage detected