Quick answer: Godot 4 Resources persisting in memory after scene unload? ResourceLoader caches by path; manual unload required for large resources.

Long play session: memory climbs as resources from unloaded scenes accumulate.

Manually unload

ResourceLoader.remove_resource_from_cache(path)

Explicit cache eviction. Memory drops.

Or use CACHE_MODE_REPLACE

Subsequent loads of the same path replace cache. Old refs garbage-collected.

Profile cache size

Editor > Project > Tools > Resource Cache. Monitor; evict aggressively.

“Resource cache survives scene changes. Long sessions need eviction.”

If your game has many scenes, build a resource manager that tracks per-scene resources. Unload on scene change.

Related reading