Memory leak?

M

mcw.willart

Hi,

I created an app to use a RunAs om some Windows tooling (eg cmd.exe),
which I then start using Process.Start.
Every time I start a Process, the memory usage increases with
approximately 2MB.
I also created a second Form with a Webbrowser control on it. When I
show this second form, memory usage increases with about 40MB; closing
the form doesn't do any decrease in memory usage.

Anyone any idea?

Kind regards,

Mario
The Netherlands
 
I

Ignacio Machin \( .NET/ C# MVP \)

HI,

Hi,

I created an app to use a RunAs om some Windows tooling (eg cmd.exe),
which I then start using Process.Start.
Every time I start a Process, the memory usage increases with
approximately 2MB.
I also created a second Form with a Webbrowser control on it. When I
show this second form, memory usage increases with about 40MB; closing
the form doesn't do any decrease in memory usage.

You have to trust that the OS is managing the memory for you. Memory
management is a complex matter to start with.

Must probable the 2MB increase that you see with the start of each process
is associated with a local heap (it might be empty @ start)

The memory is marked as free when you close the form, but most probably will
be kept with the prev. app just in case you want to reopen it again.

Again, do not worry about that UNLESS you see an out of memory issue
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top