Opened 7 years ago

Closed 7 years ago

#16308 closed defect (fixed)

_WidgetsInTemplateMixin _startupWidgets property leaks memory

Reported by: Colin Snover Owned by: bill
Priority: undecided Milestone: 1.9
Component: Dijit Version: 1.8.1
Keywords: Cc:
Blocked By: Blocking:

Description

_startupWidgets property is not nulled after startup is called which means that widgets that are created in a template and then subsequently destroyed are not garbage collected until the parent widget can also be garbage collected. There is no reason for this list to persist past startup. (In fact, the destroy method of child widgets should probably be aspected too so if someone destroys a child widget before startup, _WidgetsInTemplateMixin does not attempt to start it, but that is a separate issue.)

Change History (2)

comment:1 Changed 7 years ago by bill

Milestone: tbd1.9
Status: newassigned

I'm surprised you are individually destroying widgets in the template, but sure, I can null out that property at the end of startup().

comment:2 Changed 7 years ago by bill

Resolution: fixed
Status: assignedclosed

In [29914]:

null _startupWidgets[] after startup(), to avoid memory leak, fixes #16308 !strict

Note: See TracTickets for help on using tickets.