ID:115204
 
Not Feasible
Applies to:Dream Maker
Status: Not Feasible

Implementing this feature is not possible now or in the foreseeable future
There doesn't seem to be a way to check if atoms are eligible for garbage collection. It would be nice if there was.
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()
..()
spawn()while(1)
for(var/A)if(canGarbageCollect(A))world<<A
sleep(10)
SuperAntx wrote:
Something like this shouldn't be effected.
world/New()
> ..()
> spawn()while(1)
> for(var/A)if(canGarbageCollect(A))world<<A
> sleep(10)

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.
What about being able to read /refcount?
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.
Ter13 resolved issue (Not Feasible)

If you have an object reference on hand that you want to check for deletion eligibility, it is by definition, ineligible for object deletion.