Discord
Login
Community
DARK THEME

Garbage collection

So I know that removing an object from a list will cause garbage collection to remove it, but I was wondering if I could instead store an object in a single variable and then assign a new object to that variable after. Will garbage collection still kick in?

Garbage Collection only kicks in, when objects are found, that are not referenced anymore, as far as I know.

so if I create an object called helloWorld with several members, then overwrite it with 0, these members inside the object are gone.

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community