Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsClientAPIClientAPIWhy AJAX has a memory leak?Why AJAX has a memory leak?
Previous
 
Next
New Post
12/12/2005 2:18 AM
 
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 1:09 PM
 

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/14/2005 1:57 AM
 

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 12:53 PM
 
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 8:42 PM
 
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
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsClientAPIClientAPIWhy AJAX has a memory leak?Why AJAX has a memory leak?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, 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 DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out