Thanks, true helper;
Just issue a: delete myElement; and the memory is freed

On Jun 28, 9:36 pm, Ricardo <ricardob...@gmail.com> wrote:
> On Jun 28, 5:19 am, Laszlo Bagi <laszlo.b...@gmail.com> wrote:
>
>
>
>
>
> > Hi!
>
> > I've started to deal with jQuery for few months ago and I bumped into
> > some freaks but this was the first time (yesterday) when I blunder
> > into a problem which queries the availability of the whole jQuery
> > framework.
>
> > I've got several problems with the remove() function... I hope you can
> > help me to solve them.
>
> > According to the documentation:
>
> > jQuery.remove():
> >   Removes all matched elements from the DOM.
> >   This does NOT remove them from the jQuery object, allowing you to
> >   use the matched elements further.
>
> > So if I understand the documantation well:
>
> > 1) There is a given window "window1". I try to open an other window
> > "window2" FROM "window1" and I try to move an HTML element from
> > "window1" to "window2". Is that possible that the element belonging to
> > deleted jQuery object will be able to available in both JQuery
> > "array"?
>
> What do you mean "jQuery array"? Everytime you call $/jQuery you
> create a new object, there is no global jQuery object containing
> elements. When you remove an element, it is detached from the DOM and
> saved in a specific object.
>
> var myElement = $('#myEl').remove();
> // #myEl is now in the myElement object, detached from any document
>
> // you can append it to another window's document
> $(window2.document.body).append( myElement );
>
> (not sure the appending will work, there are issues when dealing with
> HTMLElements across frames you have to take into account, but that's
> the logic)
>
>
>
> > 2) If I have to generate a list of unique "id"-s which contains
> > several hundred rows then the jQuery "array" is just growing, growing,
> > growing ad infinitum?
>
> Why would you do that? And what do you mean by "the jQuery array"
> again? No, an object will grow as large as the number of elements you
> put in it.

Reply via email to