Archive

Posts Tagged ‘access’

Who needs access to Garbage Collection?

March 3rd, 2008 No comments

A very important functionality was added (I guess) to Flash player update 3, but is still used for debugging purposes : the System.gc() . As we know, we should never rely on garbage collection for immediate clean up of active objects. Instead, we are still using removeEventListener, close, and null (most of the times) trying to obtain immediate behavior for cleaning up active objects. This is not always the case, isn’t it? I mean, it functions but there are strange situations when we have to make sure that client’s computer is not stalling because of excessive amount of RAM used.

Maybe it is time that we gain more access to the garbage collection, at least in a standard manner like : System.pause(); System.gc(); (because the coder knows for sure there is garbage to be wiped) and System.resume() to get back on business.

Who is with me on this one? Come on, let’s cry out loud that we need to manage our own memory, at least on some important operations (like module loading and unloading) – I’ve forced my clients to use the latest Flash Player, do you think I’ll have to send them to buy some more RAM ?