4 ms·
> what is the use-case of a garbage collector in this language? Same as other languages. > I always had the impression that with the well-defined lifetimes of
by FartyMcFarter 3y ago
> what is the use-case of a garbage collector in this language?
Same as other languages.
> I always had the impression that with the well-defined lifetimes of objects, you wouldn't really create garbage to begin with
There's no well defined lifetime of objects when it comes to dynamic allocation. For example, if you allocate something with the new keyword, there are no language guarantees that this won't leak memory.