Missing Field.destroy()

0 views
Skip to first unread message

Deva Satyam

unread,
May 16, 2008, 4:01:28 AM5/16/08
to inputex
YUI components usually have a destroy() method to make sure all
resources taken by the component are freed. For example, event
listeners do not dissappear when the element listened to is deleted,
which usually leaves behind lots of trashed memory.

I also added a suggestion in SourceForge so that Element includes a
destroy() 'abstract' method:

http://sourceforge.net/tracker/index.php?func=detail&aid=1965145&group_id=165715&atid=836479

Actually, a destroy method could already do a purgeElement on
this.divEl, just in case, to wipe out any possible listeners.

http://developer.yahoo.com/yui/docs/YAHOO.util.Event.html#method_purgeElement

neyric

unread,
May 19, 2008, 6:05:38 AM5/19/08
to inputex
Ok,
This will be added in the next revision...

On 16 mai, 10:01, Deva Satyam <DevaSat...@gmail.com> wrote:
> YUI components usually have a destroy() method to make sure all
> resources taken by the component are freed. For example, event
> listeners do not dissappear when the element listened to is deleted,
> which usually leaves behind lots of trashed memory.
>
> I also added a suggestion in SourceForge so that Element includes a
> destroy() 'abstract' method:
>
> http://sourceforge.net/tracker/index.php?func=detail&aid=1965145&grou...
>
> Actually, a destroy method could already do a purgeElement on
> this.divEl, just in case, to wipe out any possible listeners.
>
> http://developer.yahoo.com/yui/docs/YAHOO.util.Event.html#method_purg...
Reply all
Reply to author
Forward
0 new messages