[ALOY-1303] $.removeListener() should be called by $.destroy()
| GitHub Issue | n/a |
|---|---|
| Type | Improvement |
| Priority | None |
| Status | Open |
| Resolution | Unresolved |
| Affected Version/s | Alloy 1.7.1 |
| Fix Version/s | n/a |
| Components | Runtime |
| Labels | n/a |
| Reporter | Fokke Zandbergen |
| Assignee | Bruce Wayne |
| Created | 2015-09-16T06:30:08.000+0000 |
| Updated | 2015-09-16T07:56:04.000+0000 |
Description
The [current implementation](https://github.com/appcelerator/alloy/pull/671) of ALOY-1237 uses the new
$.addListener() method for any event listeners set on proxy objects via the XML.
This way the user can remove all or specific event listeners via $.removeListener().
It would be better if the template for $.destroy() would include a call to $.removeListener() so that the user only has to call $.destroy() to both clean up listeners to global collections as well as local proxies.
@fokke you meant: ... would include a call to $.removeListener() ... ?
Indeed, thanks :D