ID:115204
Jun 29 2011, 5:45 pm
|
|||||||
Not Feasible
| |||||||
There doesn't seem to be a way to check if atoms are eligible for garbage collection. It would be nice if there was.
|
Jun 29 2011, 5:47 pm
|
|
If you're going to check it that means you have a reference to it and that means that it won't be eligible for garbage collection.
|
Something like this shouldn't be effected.
world/New() |
SuperAntx wrote:
Something like this shouldn't be effected. I somewhat understand what your saying but having for(var/A) already creates a reference anyway you look at it. |
Hmm, I guess you're right. You might need some sort of type modifier like tmp or global to prevent the reference from interfering with the garbage collector.
|
Hiro the Dragon King wrote:
What about being able to read /refcount? That sounds better. |
If an object has a refcount of 0 it's deleted immediately, so this proc would never work.
Being able to read the refcount could be borderline useful, but I've considered that before and as I recall there was something wrong with it that I couldn't work out. |