Gc
gdext.internal.Gc
object Gc
Control over the Scala Native garbage collector (Boehm, stop-the-world, single-threaded — the GC the sbt plugin always configures).
Engine objects never depend on the GC: their lifetimes follow Godot (scene tree, free(), owned RefCounted references), so collecting, pausing or resuming the GC never frees a Godot object. What the GC reclaims is plain Scala heap: wrappers, closures, strings, collections, math values.
Typical game use: Gc.collect() at a loading screen or level transition, and Gc.paused { ... } around a short burst that must not stutter. Reached as gdext.api.Gc.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Gc.type
Members list
In this article