Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1303] $.removeListener() should be called by $.destroy()

GitHub Issuen/a
TypeImprovement
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sAlloy 1.7.1
Fix Version/sn/a
ComponentsRuntime
Labelsn/a
ReporterFokke Zandbergen
AssigneeBruce Wayne
Created2015-09-16T06:30:08.000+0000
Updated2015-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.

Comments

  1. Andrey Tkachenko 2015-09-16

    @fokke you meant: ... would include a call to $.removeListener() ... ?
  2. Fokke Zandbergen 2015-09-16

    Indeed, thanks :D

JSON Source