Opened 14 years ago
Closed 11 years ago
#7843 closed defect (fixed)
leak in dijit.registerWin
Reported by: | liucougar | Owned by: | |
---|---|---|---|
Priority: | high | Milestone: | 1.4 |
Component: | Dijit | Version: | 1.2.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
no dojo.disconnect corresponds to the dojo.connect in dijit.registerWin
this leads to leaks in at least IE, I think we need to take care of that
Attachments (1)
Change History (8)
comment:1 follow-up: 2 Changed 14 years ago by
Milestone: | tbd → future |
---|
comment:2 follow-up: 4 Changed 13 years ago by
Replying to bill:
Hmm, feel free to work on this.
It's a bit troublesome though... we would need a deregisterWindow() call to complement registerWin(), and perhaps change registerWin() to return a handle... then change all the calling code.
Why there is dojo.connect only for 'onmousedown' event, but 'onactivate', 'focus' and etc. are using doc.attachEvent for IE and doc.addEventListener for other?
When I rewrite registering of 'onmousedown' and used jsleaksdetector it shows that there is no memory leak.
I am not sure that my solution was right. Why there used dojo.connect instead of using direct methods?
Changed 13 years ago by
Attachment: | focus.js.diff added |
---|
Patch for solving memory leaks in IE, not sure that it's right solution
comment:4 Changed 13 years ago by
Replying to coldwind:
Why there is dojo.connect only for 'onmousedown' event, but 'onactivate', 'focus' and etc. are using doc.attachEvent for IE and doc.addEventListener for other?
FYI, AFAIK I could have used attachEvent()/addEventListener() for onmousedown. I just used dojo.connect() because it's used everywhere in dojo.
The reason I _didn't_ use dojo.connect() for detecting focus is that a dojo.connect() on the <body> node won't work, because focus events don't bubble (except via attachEvent()/addEventListener()).
comment:5 Changed 13 years ago by
(In [17957]) Refs #7843 Fixes the issue where the Gallery calls a non-existent method "toggleSlideshow" on the SlideShow? widget.
comment:6 Changed 13 years ago by
Apologies, I added the wrong ticket reference to a checkin. It should have been #7873
comment:7 Changed 11 years ago by
Milestone: | future → 1.4 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
This was fixed in 1.4, which incidentally switches to using native calls (instead of dojo.connect()) to monitor onmousedown.
Hmm, feel free to work on this.
It's a bit troublesome though... we would need a deregisterWindow() call to complement registerWin(), and perhaps change registerWin() to return a handle... then change all the calling code.