MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / destroySelf

Method destroySelf

Engine/source/sfx/sfxBuffer.cpp:237–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

235//-----------------------------------------------------------------------------
236
237void SFXBuffer::destroySelf()
238{
239 AssertFatal( !isDead(), "SFXBuffer::destroySelf() - buffer already dead" );
240
241 mIsDead = true;
242 if( !mAsyncState )
243 {
244 // Easy way. This buffer has finished all its async
245 // processing, so we can just kill it.
246
247 delete this;
248 }
249 else
250 {
251 // Hard way. We will have to make the buffer finish
252 // all its concurrent stuff, so we mark it dead, make sure
253 // to see an update, and then wait for the buffer to surface
254 // on the dead buffer list.
255
256 SFXInternal::TriggerUpdate();
257 }
258}
259
260//-----------------------------------------------------------------------------
261

Callers 1

_releaseAllResourcesMethod · 0.45

Calls 1

TriggerUpdateFunction · 0.85

Tested by

no test coverage detected