Hi there,

I left my program running in debug mode all night and found that by this morning all my memory had been consumed by it (2GB for a tiny little program is a little excessive, methinks). As I am fairly new to VB.Net and just as new to programming on the Windows platform, I am unsure what to use or how to go about it. Under Linux I would use valgrind and/or electric fence.
I know that in my code I do New calls, which I was under the impression would be disposed of by the garbage collector as soon as the var goes out of scope or no references are left to the object in question. Are unused objects something I should take care of myself? I don't have a problem with that, plenty of other languages require you to do that for you. What would be the preferred method to get rid of an unused object? Would it be foo.Dispose() or foo = Nothing? I noticed that not all classes have the Dispose() method either.
My program is rather small at the moment, so tracking down all the New calls by hand would be fairly trivial. However, I'd like to learn how to deal with this kind of problem in a generic way so that as my program grows, I will still be able to apply the same methods to track down the root cause (apart from the obvious: bad programming).

Thanks,
Mightor