Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

AspDotNetStoreFront
  Ads  
r2i.ntegrated
 


  Sponsors  

Meet Our Sponsors

ExactTarget email software solutions
Merak Mail Server
WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
FCKeditor Project
Salaro -- Skins and more
OnyakTech
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  ClientAPI Compo...  Why AJAX has a memory leak?
Previous Previous
 
Next Next
New Post 12/11/2005 11:18 PM
User is offline yang jj
1 posts
10th Ranked


Why AJAX has a memory leak? 
Modified By Jon Henning  on 12/12/2005 1:07:18 PM)
Mr. Jon:
I have a problem when i use ClientAPI to work. All the codes work properly, but have memory leak, i cannot find the reason. I check my script code, but no wrongs there. So beg your help.
When I comment all the sentences in the function clt369_successFunc(result, ctx), it has also memory leaks, but only 4k/s. But parse the returned result string and assign the string to the HTML element, it has 16k/s maybe more.

The script code is as follows:
Removed script from post since it was causing errors
 
New Post 12/12/2005 10:09 AM
User is offline Jon Henning
1622 posts
www.codeendeavors.com
5th Ranked










Re: Why AJAX has a memory leak? 

I believe I isolated the issue.  Please open up your dnn.xmlhttp.js file in the js folder and change the following function (approx line 109)

dnn_xmlhttp.prototype.XmlHttpRequest.prototype.onreadystatechange = function ()

{

if (this.statusFunc != null)

this.statusFunc(this._request.readyState, this.context);

if (this._request.readyState == '4')

{

this.complete(this._request.responseText);

this._request.onreadystatechange = new function() {};//stop IE memory leak. Not sure why can't set to null;

}

}

 

Let me know if this fixes the issue for you so I can release an appropriate patch.


 
New Post 12/13/2005 10:57 PM
User is offline Michael wang
3 posts
10th Ranked


Re: Why AJAX has a memory leak? 

Thank you for your reply. I change the function as you directed, but it didnot work well as i expected.

    As time goes, the memory used is increased continously. I thinks this over and over again, but i can't find

the reason. So i being to think that i can't use the AJAX in timer function. I changed my script, use the function

"setTimeout" instead of the function "setInterval", but the reault is as usual.

   Please check my script if there are some mistakes. If there are some, tell me so i can get the expected result.

 
New Post 12/14/2005 9:53 AM
User is offline Jon Henning
1622 posts
www.codeendeavors.com
5th Ranked










Re: Why AJAX has a memory leak? 
I am curious if what you are seeing is a leak. Dynamically updating the page will consume memory. The trick is whether or not IE gives it back when the page refreshes. Are you only seeing this "leak" in your module or does it also occur in my HelloAJAX module (after my fix)?  If so, then could you please provide specifics behind what you are calling a leak? Also could you specify what you mean by "it did not work as well as I expected". Did it help things?
 
New Post 12/15/2005 5:42 PM
User is offline Michael wang
3 posts
10th Ranked


Re: Why AJAX has a memory leak? 
Maybe i didn't tell you clearly. I commented all my code for parsing the result string and assigning value to html controls, only left the callback caller and the timer function. Afterward I checked the memory used in windows task manager and found the memory increased slowly. After some minutes, the memory Definitely increased 1M. Maybe this is not called memory leak. What i was expected is that the mory is not changing as the function works, because i think after i parsed the result string the used memory of all member variables in the function is must be released. I'm not claer for the working function of JS engine, so...
 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  ClientAPI Compo...  Why AJAX has a memory leak?
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Ultra Media Gallery & Video Gallery
The most popular photo gallery and video gallery module. with Flash interface.
www.bizmodules.net
WDK Solutions
Quality modules for the DotNetNuke community. Check out our 'wild' modules!
wdkns.com
UK - DotNetNuke providers
UK providers of DNN module development and skin package design. Oxford Information Labs provides cost-effective solutions for businesses and organisations specialising in Skin design and bespoke module development.
www.oxil.co.uk

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP