-
Memory leaks?!?
I've got a managed DX program, and somewhere when i grab the form, and cause rendering to happen memory gets allocated. The more the form's repainted the more memory is used up (seen in the process list).
What's very odd is that i've commented out everything in my paint event function and all mouse/key events.
Thanks a lot for any help, this has got be stumped, as i'm pretty new to c#
-
I don't know but it's hard to say what's making mem clog without looking at the code . The main problem could be with creating objs and never disposing them after you're done . Like bitmaps and other GDI+ obj .
-
Re: Memory leaks?!?
Thanks for the reply.
That's the thing though, i've commented out absolutely all code in all events for my controls. (no rendering, or anything).
When i drag the form around the memory usage (as seen by the process list) creeps up.
-
Re: Memory leaks?!?
Do you make any objects or structs or anything in the WM_PAINT message that you are not deleting?
-
Re: Memory leaks?!?
I'm not using the message queue, i'm using the onpaint event. There's no code in the function for that even (i commented it ALL out).
-
This has been pain for all of us . Usually , .NET apps (even small ones) are memory-greedy . The main reason is behind the concept of JIT compiler and the security check which CLR does that requires both memory and CPU time .
-
Re: Memory leaks?!?
Oh ok. Thanks for the explanation. :thumb: