Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 364646 - Dojo Widgets not cleaning connections
Summary: Dojo Widgets not cleaning connections
Status: RESOLVED WONTFIX
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-23 14:44 EST by Anton McConville CLA
Modified: 2015-01-26 15:15 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anton McConville CLA 2011-11-23 14:44:57 EST
Build Identifier: 

Noticed whilst browsing the code that some Dojo Widgets are not cleaning up their dojo.connections with dojo.disconnect in a destroy method. This can contribute to memory leaks, which could mount up, depending on the page behavior.

If widgets are programmed to use this.connect ( some are ) instead, of dojo.connect, then the connections are automatically cleaned up by the default widget behaviour.

Reproducible: Always

Steps to Reproduce:
Search for dojo.connect in

1. ExplorerTree
2. ImportDialog
3. LoginDialog
4. NewItemDialog
5. NewSiteDialog
6. OpenResourceDialog
7. SFTPConnectionDialog
8. SiteEditor
Comment 1 Susan McCourt CLA 2012-11-07 16:13:08 EST
we'll stop using connect/disconnect but we need to ensure that the dijit-less versions of our dialogs are still cleaning up (addEventListener/removeEventListener)
Comment 2 Susan McCourt CLA 2012-11-29 13:00:34 EST
I think the main place to examine for cleanup is commands, since the command buttons (and tooltips) often get replaced in the same page.  (For example if the editor hash or navigator hash changes).  

We already call "commandService.destroy" in these cases, so we would probably want to do all our disconnects from buttons/links and also tooltip node removal at this time.
Comment 3 Susan McCourt CLA 2013-01-11 11:41:16 EST
changing dependencies.  This doesn't block "library independence" but needs to get done in 2.0
Comment 4 Anthony Hunter CLA 2015-01-26 15:15:59 EST
(In reply to Anton McConville from comment #0)
> Noticed whilst browsing the code that some Dojo Widgets are not [snip]

The Orion client no longer uses Dojo so this defect is not applicable.