Changes between Version 2 and Version 3 of Ticket #15851


Ignore:
Timestamp:
Aug 16, 2012, 1:16:30 AM (9 years ago)
Author:
bill
Comment:

Turns out _WidgetBase already releases handles (for DOMNode connections anyway), so reappropriating this ticket for the Destroyable issue.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #15851

    • Property Summary changed from _Widget.destroy(): release all handles returned from _Widget.on() to Destroyable: a handle can't be owned by multiple Destroyables
    • Property Type changed from enhancement to defect
  • Ticket #15851 – Description

    v2 v3  
    1 To safeguard against memory leaks, and to avoid any funny business when calling destroy(true)  (which destroys the widget but preserves the DOM), maybe _Widget.on() should call this.own() on every handle it returns.
    2 
    3 Also, Destroyable probably shouldn't set handle._odh (storing it's own handle inside the original handle) because it creates an unnecessary limitation that a given handle can only be owned by one Destroyable object.   Rather, _odb can be a variable in the closure.
     1Destroyable probably shouldn't set handle._odh (storing it's own handle inside the original handle) because it creates an unnecessary limitation that a given handle can only be owned by one Destroyable object.   Rather, _odb can be a variable in the closure.