[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
www.dhtmlgoodies.com • View topic - How memory works for HTML DIV tag content ?
Advertisement

How memory works for HTML DIV tag content ?

Moderators: Calcifer, slothy

How memory works for HTML DIV tag content ?

Postby qwerty_zxcv » Fri Dec 08, 2006 8:40 am

Hello;

I want to use a DIV tag for some search results containing images.
For each search request, I use this DIV tag. This search results could be retrived using AJAX for many times on the same DIV tag.

In this case , how memory works. :?:
For each DIV content refresh memory will be cleared ? or some times later will I get memory leak on my system?

Anyone has opinion on this scenario?

Thanks..[/quote]
qwerty_zxcv
 
Posts: 2
Joined: Fri Dec 08, 2006 8:28 am

Postby Batalf » Fri Dec 08, 2006 10:16 am

Hi qwerty_zxcv,

welcome to the forum :D

Updating a div several times won't cause any memory leak. Each browser has their own way of handling memory cleanup.

I'm not aware of any memory problems at all in Firefox.

However, there is a "well known" memory problem in IE caused by circular references. A circular reference happens when

1. Your javascript code has a reference to a DOM element(example a tag)
2. The DOM element got a reference back to your javascript code.

This typically happens in event handlers. When this happens in IE, the memory won't be released until the browser is completely closed. And you if you do a page refresh, the script will use more and more of your available memory.

You will find a lot more on this topic by making a google search on the words

ie memory leak javascript

But generally, updating a div several times shouldn't cause any memory problems. If you experience these kinds of problems, it's not caused by that, but by some other problems in the code.
Batalf
Site Admin
 
Posts: 2160
Joined: Sat Oct 22, 2005 9:38 pm

Postby qwerty_zxcv » Fri Dec 08, 2006 10:21 am

qwerty_zxcv
 
Posts: 2
Joined: Fri Dec 08, 2006 8:28 am


Return to General questions regarding AJAX scripts

Who is online

Users browsing this forum: No registered users and 4 guests

cron