As I go through optimising code, one thing I’d love to get a handle on is the number of event listeners on objects. Particularly the Runtime object.
I notice that there are a few fields like _functionListeners and _tableListeners, but I assume they’re not supposed to be used by developers.
Ideally I’d love to see an addition to the EventListener API which returns the list of listeners, or the number of listeners.
Something like:
local enterFrameListeners=Runtime:listListeners("enterFrame")
print (#enterFrameListeners .. " enterFrame listeners currently attached to the Runtime object")
[import]uid: 102086 topic_id: 32497 reply_id: 332497[/import]