Skip to main content

Search and Top Navigation

#5118 closed bug (notabug)

Opened February 01, 2010 02:50PM UTC

Closed February 16, 2011 07:46AM UTC

this.options never deleted

Reported by: schaef Owned by: schaef
Priority: major Milestone: 1.9.0
Component: ui.widget Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:
Description

If you store some data in your widget with

this._setData('test', largeJson);

and than remove your widget from DOM, the largeJson will not be removed by the default destroy method. It stays until a page refresh in the memory.

If I add the line

delete this.options;

in the default destroy method in ui.core.js the 'real' object is removed from memory.

It seems to me that jQuery.cache.id.widgetname.options.test is only a reference to the place of the object 'largeJson'. And that only the reference is deleted by default, not the value itself.

Attachments (0)
Change History (5)

Changed February 18, 2010 01:58PM UTC by scottgonzalez comment:1

component: ui.coreui.widget

Changed July 30, 2010 11:57AM UTC by jzaefferer comment:2

Are you suggesting to add

delete this.options
in the destroy methods?

I wonder if a proper GC shouldn't clean this up once there is no reference left to the widget instance. Maybe a instance reference still exists and we should actually clean that up.

Changed August 23, 2010 06:06PM UTC by scottgonzalez comment:3

The _setData method no longer exists. Can you check whether this problem still exists in the most recent version?

Changed February 01, 2011 11:10AM UTC by scottgonzalez comment:4

owner: → schaef
status: newpending

This sounds like you're keeping a reference to the data yourself somewhere else.

Changed February 16, 2011 07:46AM UTC by trac-o-bot comment:5

resolution: → invalid
status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!