dispose method

void dispose()

Releases this group's claim on everything loaded through track, then releases the progress notifier.

Call when the scope this group represents ends, typically a level or a screen. Each tracked load took a claim on the engine's shared cache, and this gives them all back, so a resource nothing else claims leaves the cache. After disposal the group must not be added to or listened on.

This releases the engine's references, not the memory. A resource a live scene still points at stays resident until that reference goes too, and the GPU allocation is reclaimed after that on the engine's schedule rather than at this call. Use takeMemoryReport to see what is actually pinned.

Implementation

void dispose() {
  if (_disposed) return;
  _disposed = true;
  release();
  _progress.dispose();
}