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  |  

AppTheory specializes in solutions based on the DotNetNuke platform and has 2 employees on the DotNetNuke Core Team.
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
Aspose - The .NET & Java component publisher
 


  Sponsors  

Meet Our Sponsors

R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
SmarterTools
The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  ClientAPI Compo...  Why AJAX has a memory leak?
Previous Previous
 
Next Next
New Post 12/11/2005 10: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 9:09 AM
User is offline Jon Henning
1605 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 9: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 8:53 AM
User is offline Jon Henning
1605 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 4: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.

 


Expressnet - DotNetNuke Hosting
Expressnet provide premium quality ASP.NET Web Hosting. We specialise in Windows based products including ASP.NET and Microsoft SQL Server. We offer fantastic value packages for DotNetNuke hosting. We also offer free asp.net web hosting
www.expressnet.com.au
Softech Development, Inc.
We help your business work smarter with DotNetNuke. Whether you need a new implementation, a custom module or skin for an existing implementation, or integration with your business processes, Softech has the experience and expertise to make it happen.
www.softechdevelopment.com
Module Development by Engage Software
Specializing in custom module development, training and skinning.
www.engagesoftware.com

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