On 2006.08.15, Jonathan Sharp <[EMAIL PROTECTED]> wrote:
> >I'll look into the memory leakage part, but I've never really noticed it
> >myself.
>
> I doubt it would be a memory leak since the form is part of the dom. All it
> does is leave around some extra elements. In short it should clean up what
> it alters.
Yes, but every time the click handler is fired, it creates a new "form"
and "input" node ... and never removes them. Imagine a web application
where the page is long-living (which is reasonable given AJAX). What
will happen to the DOM tree? It'll continue to accumulate "form" and
"input" nodes each time the click handler is fired.
Or, am I missing something here? Do the form/input nodes get removed
and I just can't tell? If so: why does the edited element stay rendered
the way it is? From my empirical tests, it seems that the "form" node
continues to exist after the submit/reset of the in-situ editing is
performed.
You're correct that it "leaks" dom objects but "memory leak" refers to when an object is created and is no longer referenced and fails to get garbage collected. So there's no way to access the object and it never gets freed.
-js
_______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
