MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / ~SimObject

Method ~SimObject

Engine/source/console/simObject.cpp:110–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108//-----------------------------------------------------------------------------
109
110SimObject::~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

Callers

nothing calls this directly

Calls 5

avarFunction · 0.85
unresolveMethod · 0.80
unregisterReferenceMethod · 0.80
decRefCountMethod · 0.45
testMethod · 0.45

Tested by

no test coverage detected