views:

37

answers:

1

Explanation:

I have this in the server side:

$objec->write( "divx" );

Then in the user agent (jQuery):

<div id="divx">
<!-- SERVER: here will be the content begins -->
<script type="text/javascript" language="javascript">
var r = $('#divx').myPluginCreator();
</script>
<!-- SERVER: content ends -->
</div>

Now the plugin has a method that communicates with the server (AJAX), and get the same object in the same DIV (divx):

<script> r.refreshObject( 'parameter=morecontentplease' ); </script>

When the new content of the div comes from the server, is assigned by this method using .html() jQuery method, and cleans all in the 'divx' DIV.

My question is if the memory now has 2 objects (the last and the new), or the last element was deleted, if not, how to delete it?

+1  A: 

No, the previous content of the div is completely removed from the DOM and does not remain in memory.

Dave