I am developing a application and I think I have a memory
leak, but I am not sure.

TESTS:

1: I open and close a edit window I have work on for 2
weeks the memory grows by 6MB
2: I open and close the same edit window with no code, no
data just controls and the memory grows by 6MB
3: I create a brand new form with a couple of random
controls and no code and I open and close it the using the
same SUB, memory does not increase at all.

Something seems to be wrong with my window however I have
no idea what. Could someone give me some insight into why
this would be happening.

I really do not want to cut and paste all my code and
controls into another window just to find out I still have
the same problem.

Re: Memory Issue by Pete

Pete
Mon Sep 08 15:07:40 CDT 2003

Post some code. Otherwise anything anyone says will probably be a guess.

-- Pete

Igor Visser wrote:
> I am developing a application and I think I have a memory
> leak, but I am not sure.
>
> TESTS:
>
> 1: I open and close a edit window I have work on for 2
> weeks the memory grows by 6MB
> 2: I open and close the same edit window with no code, no
> data just controls and the memory grows by 6MB
> 3: I create a brand new form with a couple of random
> controls and no code and I open and close it the using the
> same SUB, memory does not increase at all.
>
> Something seems to be wrong with my window however I have
> no idea what. Could someone give me some insight into why
> this would be happening.
>
> I really do not want to cut and paste all my code and
> controls into another window just to find out I still have
> the same problem.



Re: Memory Issue by Herfried

Herfried
Mon Sep 08 15:51:01 CDT 2003

Hello,

"Igor Visser" <Igor@techworks.ca> schrieb:
> I am developing a application and I think I have a memory
> leak, but I am not sure.
>
> TESTS:
>
> 1: I open and close a edit window I have work on for 2
> weeks the memory grows by 6MB
> 2: I open and close the same edit window with no code, no
> data just controls and the memory grows by 6MB
> 3: I create a brand new form with a couple of random
> controls and no code and I open and close it the using the
> same SUB, memory does not increase at all.

http://msdn.microsoft.com/library/en-us/cpguide/html/cpconprogrammingessentialsforgarbagecollection.asp

You can use a profiler:

http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=3254325d-a4aa-4bb3-aa86-c72d5104ec74

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet