Reputation: 13
I am working on an ASP.NET page using C#. I have a label that I am outputting a large string to. Then I am clearing the label and outputting a large string to it again. I have been monitoring the memory usage of my browser, Chrome/IE, and have noticed that the memory keeps going up, even after I clear my label. It is important to note that I am using AJAX for this label so that the button only updates the label not the entire page.
For instance it starts using about 25mb. Then after I output a large string to the label it jumps to about 27mb. Then I clear the label, and it still sits around 27mb. Then if I repeat this process the memory usage keeps jumping by about 2mb/click.
Is this an obvious sign of a memory leak or does this have to do with the AJAX?
Any thoughts/links provided are appreciated!
Upvotes: 0
Views: 521
Reputation: 13
Thanks for the feedback everyone it was extremely helpful! I did narrow this down to a client side javascript error that is caused by using ASP.NET Validators inside of an ajaxified panel. The ASP.NET validators re-register every time they are updated within a panel giving weird results such as a validation summary displaying the same error message multiple times. This also caused my memory leak because the way that the validators are registered, with javascript.
More information on the validation errors can be found here http://jatindersingh.blogspot.com/2009/03/validationsummary-displayed-multiple.html
Upvotes: 1
Reputation: 5195
Are there any other elements in the page which reference any of the large strings after you clear the label? If so, that may be a reason why the memory is growing like it does.
Upvotes: 0