Re: Memory Leak IE Javascript attribute add onblur
- From: David Mark <dmark.cinsoft@xxxxxxxxx>
- Date: Thu, 11 Oct 2007 21:34:26 -0700
On Oct 11, 1:30 pm, Joshua <joshuafa...@xxxxxxxxx> wrote:
On Oct 5, 1:45 pm, Joshua <joshuafa...@xxxxxxxxx> wrote:
On Oct 5, 10:02 am, Henry <rcornf...@xxxxxxxxxxxxxx> wrote:
On Oct 4, 3:38 pm, Joshua wrote:
On Oct 3, 9:41 am, Henry wrote:<snip>
In the code behind (.cs) I'm adding onchange, onblur and
onfocus events to a bunch of objects that reside on my
page (textboxes and dropdownlist).
But what your "code behind" is doing is generating HTML and/or
client- side javascript, which is actually doing the work of
adding event handling functions to HTML elements (or causing
that work to be done, but still on the client). You (or
someone who understands it) need to be looking at the HTML
and/or javascript output from your servers and sent to the
browser to be interpreted/rendered/executed there.
After using Drip i've found that these are leaving open DOM
objects.
Does anybody know how to kill these when I exit the page?
<snip>Yes, but not in any way specific to your code. ...
reg:
"reg"?
You handle the issue by avoiding forming such circular
references or explicitly breaking them when they are no longer
important (as the page unloads at the latest).
Do you know how to do this?
Yes, for code I can understand.
Do i just find the objects on unload and
set them to null?
Objects cannot be set to null. References to objects can be set to
null, and breaking circular chains of references usually involves
setting references to objects to null.
If so how can i find all the objects?
What objects?
Can I write a general recursive function to kill all open
circular references on unload?
Yes, but it is a very bad idea because it is very time consuming to
null all possible object references from all DOM Nodes and ActiveX
objects used (though some XML HTTP request systems would not leave the
request objects exposed so onunload cleanup would not be practical).
It is better to break only the circular references you mad in your
client-side code.
So how can you identify and kill a circular DOM reference? Any
ideas? Is there a link to something out there to some code samples?
It's funny. If I remove all the ajax toolkit items then all the open
DOM leaks go away. The calendar extender and the cascading dropdown
items create circular DOM references.
And they don't break them on unload? If not, they are poorly written
widgets and you should stop using them.
Ajax is pretty, but always seems to cause more problems than it's
worth.
Your problem has nothing to do with Ajax. You are confusing Ajax with
DOM manipulation.
.
- References:
- Memory Leak IE Javascript attribute add onblur
- From: Joshua
- Re: Memory Leak IE Javascript attribute add onblur
- From: Henry
- Re: Memory Leak IE Javascript attribute add onblur
- From: Joshua
- Re: Memory Leak IE Javascript attribute add onblur
- From: Henry
- Re: Memory Leak IE Javascript attribute add onblur
- From: Joshua
- Re: Memory Leak IE Javascript attribute add onblur
- From: Joshua
- Memory Leak IE Javascript attribute add onblur
- Prev by Date: Re: Do <script tags have to appear in <head section?
- Next by Date: Re: Memory Leak IE Javascript attribute add onblur
- Previous by thread: Re: Memory Leak IE Javascript attribute add onblur
- Next by thread: Re: Memory Leak IE Javascript attribute add onblur
- Index(es):
Relevant Pages
|