|
-
Oct 31st, 2020, 01:55 PM
#11
Hyperactive Member
Re: Charts controls with GDI+
 Originally Posted by wqweto
Is this machine translated? This is like advising not to worry and to always destroy GDI objects & handles and everything will be ok. Until it's not ok because for one reason or another you miss on destroying everything which is the point. . . Anyway.
Can you share with us how do you prevent leakage in GDI+? How do you detect it? Which perfmon counters do you use? Which API functions report outstanding handles or similar debug aides?
cheers,
</wqw>
Sorry so long to come back to this.
I have no concrete method of detecting leaks in GDI+, and I'm not sure that such a thing exists. When testing, I monitor memory & handle usage via Windows Task Manager and watch for excess usage and especially watch when my program terminates to make sure that used memory returns to prior values as much as possible.
I also make sure that I destroy/delete all GDI+ objects etc. directly when done with them, and at program termination if needed which is also where I shut down GDI+ for that application. My programs always start and shut down GDI+ once only. I made a simple reusable GDI+ start/shutdown module to make it simpler for my needs.
So those are the things which I do anyway, and it seems to work well so far. I'm honestly not aware of any other way.....
Last edited by SomeYguy; Oct 31st, 2020 at 02:06 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|