MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Dispose

Method Dispose

Source/Engine/Particles/Particles.cpp:1561–1591  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1559}
1560
1561void ParticleManagerService::Dispose()
1562{
1563 UpdateList.Clear();
1564#if COMPILE_WITH_GPU_PARTICLES
1565 GpuUpdateList.Clear();
1566 if (GpuRenderTask)
1567 {
1568 ScopeLock lock(RenderTask::TasksLocker);
1569 RenderTask::Tasks.Remove(GpuRenderTask);
1570 Delete(GpuRenderTask);
1571 GpuRenderTask = nullptr;
1572 }
1573 CleanupGPUParticlesSorting();
1574#endif
1575
1576 PoolLocker.Lock();
1577 for (auto i = Pool.Begin(); i.IsNotEnd(); ++i)
1578 {
1579 auto& entries = i->Value;
1580 for (int32 j = 0; j < entries.Count(); j++)
1581 {
1582 Delete(entries[j].Buffer);
1583 }
1584 entries.Clear();
1585 }
1586 Pool.Clear();
1587 PoolLocker.Unlock();
1588
1589 SpriteRenderer.Dispose();
1590 SAFE_DELETE(Particles::System);
1591}
1592
1593void ParticlesSystem::Job(int32 index)
1594{

Callers 1

unloadMethod · 0.45

Calls 9

DeleteFunction · 0.85
LockMethod · 0.80
UnlockMethod · 0.80
ClearMethod · 0.45
RemoveMethod · 0.45
BeginMethod · 0.45
IsNotEndMethod · 0.45
CountMethod · 0.45

Tested by

no test coverage detected