This may sound like a silly question, but can you remove a graphic from an entity so it gets picked up by the garbage collector?
I been using Flashpunk for a while and I still don’t know if you can.
Thanks,
This may sound like a silly question, but can you remove a graphic from an entity so it gets picked up by the garbage collector?
I been using Flashpunk for a while and I still don’t know if you can.
Thanks,
“Whenever a variable is no longer tracked (set to null, discarded, et cetera), it is marked for collection. Once the memory usage reaches a threshold (or whenever it finds a good time), the garbage collector purges that from memory, dropping the RAM usage.”
This is what @zachwlewis says.
I guess the garbage collector does it automatically , as long as you discard the variable or set it to null.