Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The MSIE event dispatch mechanism (both in base2.dom and JSB) leaks memory #125

Open
GoogleCodeExporter opened this issue Jul 8, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Open the attached test-dom.html file in MSIE (tested on 7.0).
2. Move the mouse cursor over and out of the test div element.
3. Repeat 2.

This problem exists both in base2.dom and JSB. To test JSB use the attached
file test-jsb.html.

What is the expected output? What do you see instead?
Checking with memory leak detector like sIEve or just using the Task
Manager shows that IE is leaking memory.

What version of the product are you using? On what operating system?
base2: 1.1 (alpha1)
JSB: 0.9.6

Please provide any additional information below.
Performing the test without activating the event handlers (i.e. without
moving the mouse cursor over and out of the test div) does not show any
memory leaks.

The problem was found to be in the "onpropertychange" event handler that is
used to dispatch events in IE.

For base2.dom: adding "delete d.target; delete d.event; delete d.listener;"
at its end prevents the leaks.
For JSB: adding "delete d.listener;delete d.behavior;delete d.args;" at its
end prevents the leaks.

I'm not sure whether the above changes are really the correct fix, but they
definitely solved the problem for me.

Original issue reported on code.google.com by [email protected] on 13 Dec 2009 at 1:59

Attachments:

@GoogleCodeExporter
Copy link
Author

Note: in the attached files the paths to base2, base2-dom and base2-jsb must be 
fixed
to point to the correct js files.

Original comment by [email protected] on 13 Dec 2009 at 2:22

@GoogleCodeExporter
Copy link
Author

Thanks for the fix!

Original comment by [email protected] on 13 Dec 2009 at 5:46

  • Changed state: Started
  • Added labels: Browser-MSIE, Module-base2.DOM, Priority-Medium, Type-Defect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant