Opened 13 years ago
Closed 12 years ago
#5118 closed bug (notabug)
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.
Change History (5)
comment:1 Changed 13 years ago by
Component: | ui.core → ui.widget |
---|
comment:2 Changed 13 years ago by
comment:3 Changed 12 years ago by
The _setData method no longer exists. Can you check whether this problem still exists in the most recent version?
comment:4 Changed 12 years ago by
Owner: | set to schaef |
---|---|
Status: | new → pending |
This sounds like you're keeping a reference to the data yourself somewhere else.
comment:5 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
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!
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.