Page 1 of 1

Freeing unused GDI handles

Posted: Sun Aug 17, 2008 7:37 pm
by bendeguz
I'm writing a multimedia application using DSPack and my problem is that my app crashes after some hours and in the task manager the GDI handles are around 10000. I asked about this on their forum, but they sent me here and told me that with IHandle interface I can track down this issue. It would be nice if someone could write me a pseudo-code for freeing up the unneeded handles or confirm that it is possible with madKernel. Thank you.

Posted: Mon Aug 18, 2008 7:58 am
by madshi

I'm sorry to say but IHandle is for kernel handles (files, threads, processes, mutexes, events etc) and not for GDI handles (bitmaps, icons, brushes, pens etc).

If you're using Delphi you may want to try one of the leak checking algorithms. Personally I'm using MemProof (freeware).