Memory Profiler Tool

M

mb

I have an application with c# and c++ COM components for PPC 2002
device. After running for a while it crashed quitly. Could this be a
low memory issue? Is there any profiler tool i could use to ckeck for
memory leaks in c# app?
 
G

Guest

They'll send you a WM_HIBERNATE and then a WM_CLOSE, yes, but you can catch
both and prevent the close from happening.

-Chris
 
M

mb

Since Form class does not have any way to trap the window messages. How
can I trap the WM_HIBERNATE and WM_CLOSE messages?
 
G

Guest

Use an IMessageFilter implementation.

-Chris


mb said:
Since Form class does not have any way to trap the window messages. How
can I trap the WM_HIBERNATE and WM_CLOSE messages?
 
M

mb

Thanks Chris! Using the IMessageFilter, I was able to trap the WM_CLOSE
message. But I am still not sure why my application gets the WM_CLOSE
message when the memory has not actually low(or is it?). I have been
using ProcMan from Entrek to profile the System Memory Availablity. At
the time WM_CLOSE message was sent the Program Memory Load was 48%. Is
there any other reason why the WM_CLOSE message was sent?

Once again thank you all for helping out.
-mb
 
G

Guest

That could be low enough for it to trip - I'm not certain what the manager's
criteria are. If you get a WM_CLOSE, but it's not from a user tapping the
Close button, then you know it's from the memory manager or the "task
manager".

-Chris
 
M

mb

Hi Chris,

The WM_CLOSE message is becoming very annoying. How can I get around
this issue?
My appilcation does form caching and because of the WM_CLOSE event I
see sudden ObjectDisposedException on some forms after a period of
time. Also, who own the "task manager"?

For now I plan to capture the WM_CLOSE message and ignore it. Could
this cause any other problems?

Please advice
Thanks
mb
 
G

Guest

For now I plan to capture the WM_CLOSE message and ignore it. Could
this cause any other problems?

Nope, that's generally how it would be handled. You might manually
GC.Collect when you get the WM_CLOSE because it's telling you memory is low
(or fragmented).

-Chris
 

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

Top