menus in JS or CSS - pros? cons?

R

Richard Cornford

RobG said:
Richard Cornford wrote:
Because there is an element with an ID involved it doesn't
solve the problem in this case.

Even if:

L.onmouseover.onclick = (function(){
return function(){ roll(this); }
})();

is used?


Even that inner function would have the global object on its scope chain
(as all functions do). However, as it turns out that this type of
circular reference are not problem causing in reality it doesn't look
like it would be necessary to jump through quite this many hoops to
address the problem.

Richard.
 
M

Matt Kruse

Richard said:
[...] The theory that all circular references between DOM
nodes and javascript objects cause memory leaks in IE is insufficient
as an explanation of what happens.

Very interesting results, thank you for taking the time to test and post
code. I suspected that IE might not leak with references to the global
object in the scope, since this would probably result in very noticable
memory leaks across many web sites. So much so that Microsoft probably would
have fixed the problem by now!
[from previous reply]
They have been asked to fix it, but probably will not (or, more
realistically, cannot).

If the connection between nodes is beind destroyed when the page unloads, I
wonder why they couldn't just blindly destroy all event handlers as well,
since there could be no possible use for them after the page unloads? I
suppose the answer to that is hidden within the source code or the inner
relationships between OS components used within IE.

I wish the problem was bigger and more obvious than it apparently is now,
because then it may have been fixed already. I'm often tempted to ignore the
memory leaks, since users would rarely if ever attribute to a single site
(except in intranet or kiosk environments) the fact that IE is being slow
and consuming huge resources. Maybe then they would be left to conclude that
IE is a hog, and switch to a browser without these problems!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,802
Messages
2,569,661
Members
45,429
Latest member
FayeWagsta

Latest Threads

Top