Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Memory Management

$
0
0

I found the article interesting: link

It recommends to call $.off() after the controller is no longer needed.

The question is this:

If I call $.on() somewhere, even if all the references to the controller are removed, the controller will remain in memory, as well as all its UI objects, until I call $.off()?

I know with Titanium's addEventListener(), I don't have to worry about it, right? I mean, if no more references to the object, the object will be garbage collected, and all the event listeners added to it are automatically removed. Right?

I did run memory allocation instrument to test the $.on() scenario. I found no leak! So $.off() is redundant? I'm confused....


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>