how can I know how many EventListeners are active ?

how can I know how many EventListeners are active ?
and can I remove them all by some codes ?

thanks alot.

I think this feature is somewhere on the roadmap for a future release. Yes Ansca? Or was that just a table of active timers?

To answer your question Jason, you have to do it manually at this point. Keeping track of listeners can be tedious, but removing them is essential to freeing up memory. If you don't remove all of them, the objects associated with them can never be freed from memory. Maybe you already know this.

If I recall, Jon Beebe (creator of Ghosts vs. Monsters and much more) once suggested that for every listener you create, you add this to a list somewhere in your code. This could be a commented list, or even an old-fashioned piece of paper. I keep track of many things in a notebook, personally. This way, you *never* forget about a listener that you added, assuming you remember to write it in the list when you create it. Later, just follow this list and remove them all.

Brent

views:1516 update:2011/10/1 9:04:19
corona forums © 2003-2011