473,387 Members | 3,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Finding memory leaks in VB.Net

I have a VB.Net application that does a lot of recursion. Task Manager
shows about 19,400K in Mem Usage when the main process starts and about
31,600K when it ends. I have GC.Collect in the relevant code. Subsequent
invocations of the process just add to the Mem Usage. I am pretty sure I
am allocating objects on the heap that are not getting garbage
collected. No doubt this is my fault, but is there some way to track
this down in VB.Net? I know that VC tells you about objects that were
not deleted ... I was hoping for something similar in VB.Net.

Thanks,

--

Dennis K.
Oct 26 '06 #1
1 1232
In article <1j********************************@4ax.com>,
no****@iglou.invalid says...
I have a VB.Net application that does a lot of recursion. Task Manager
shows about 19,400K in Mem Usage when the main process starts and about
31,600K when it ends. I have GC.Collect in the relevant code. Subsequent
invocations of the process just add to the Mem Usage. I am pretty sure I
am allocating objects on the heap that are not getting garbage
collected. No doubt this is my fault, but is there some way to track
this down in VB.Net? I know that VC tells you about objects that were
not deleted ... I was hoping for something similar in VB.Net.
The .NET garbage collector runs when it needs to (and calling GC.Collect
yourself usually results in a less efficient garbage collection).

Basically, if no other application on your machine is requesting more
memory than is available, there's no need for the garbage collector to
run. When objects go out of scope, they're flagged as available for
deletion from the heap. But until there's pressure on the heap, GC
usually doesn't occur -- i.e. why go out and buy more milk if you've got
plenty in the fridge and no one is drinking that much... :)

--
Patrick Steele
http://weblogs.asp.net/psteele
Oct 26 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Maurice | last post by:
Hi there, I'm experiencing big memory problems on my webserver. First on an old RedHat 7.2 system, now on an other fresh installed Suse 8.2 system: Linux version 2.4.20-4GB...
0
by: Steve Binney | last post by:
My code makes synchronous HttpWebRequest and HttpRebResponse calls. In VS 2003, I am getting memory leaks and event handle leaks. I am closing all streams and using "using"statements. I have...
2
by: Generic Usenet Account | last post by:
I have been using STL for a long time now, without any problems. Recently we generated a purification report on our software using Rational Purify, and we found some memory leaks. My colleague...
2
by: rythm | last post by:
I read a some doumentation about avoiding Memory Leaks. Like use the Dispose method properly, creating and using variable and objects in a certain way. However, my question is how do I find Memory...
1
by: strk | last post by:
Hello, I'm trying to detect memory leaks in an external postgres extensions. Since SIZE of postgres process keeps growing between function calls, does this mean there are memory leaks in the...
8
by: ranjeet.gupta | last post by:
Dear All Is the Root Cause of the Memory corruption is the Memory leak, ?? suppose If in the code there is Memory leak, Do this may lead to the Memory Corruption while executing the program ? ...
4
by: ali.jan | last post by:
Hi, It is trivial to load an assembly in a new Application Domain. Is there any way of loading an assembly in a new process? I tried using the Process class like this: Process p = new...
3
by: Jim Land | last post by:
Jack Slocum claims here http://www.jackslocum.com/yui/2006/10/02/3-easy-steps-to-avoid-javascript- memory-leaks/ that "almost every site you visit that uses JavaScript is leaking memory". ...
1
by: Michael Schuerig | last post by:
I'm looking for strategies to find and prevent unnecessary memory consumption. This includes real memory leaks caused by browser bugs, of course, but beyond that I'm also thinking of closures that...
16
by: graham.keellings | last post by:
hi, I'm looking for an open source memory pool. It's for use on an embedded system, if that makes any difference. Something with garbage collection/defragmentation would be nice. It should have...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.