Skip to content
This repository has been archived by the owner on Jul 30, 2018. It is now read-only.

Do not own child widgets to ensure instances can be GC'd once they are no longer required #747

Merged
merged 1 commit into from
Nov 6, 2017

Conversation

agubler
Copy link
Member

@agubler agubler commented Nov 6, 2017

Type: bug

The following has been addressed in the PR:

  • There is a related issue
  • All code matches the style guide
  • Unit or Functional tests are included in the PR

Description:

As per the investigation in #745, when a parent owns its widget children it creates a handle reference that is never severed and therefore the widgets are never available for garbage collection.

Removing the automatic own on child widgets enables children to be GC'd correctly once they are no longer in use.

Related to #745

@@ -363,7 +363,7 @@ export function filterAndDecorateChildren(children: undefined | DNode | DNode[],
}
children = Array.isArray(children) ? children : [ children ];

for (let i = 0; i < children.length;) {
for (let i = 0; i < children.length; ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit picking, but why the extra space?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

linting error without it

@agubler agubler merged commit 520e6ef into dojo:master Nov 6, 2017
@agubler agubler mentioned this pull request Nov 15, 2017
@agubler agubler added this to the beta.4 milestone Jan 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants