[bug] Handles Not Being Closed Properly?

Hi StarDock,

I''m not sure if this is a proper place to post this bug, but I figure that some of the StarDock team probably belong to the Aqua Soft forums, so here goes.

I've noticed that after some fairly intensive program launching via ObjectDock v0.99a that the number of handles associated with it tend to rise quite dramatically.

When OD is initially started, it list a handle count of around 280~ via TaskManager, but after launching and closing a number of programs using it, it will climb to 2,000~.

At which point I terminate because I have read that that is a wise thing to do in order to keep XP stable.

Please look into this and let us know if this is truly a bug or not.

Thanks in advance,

Grusic

#75142

Hi,

I am sure that the rise of handles is a leak in OD, but:

Under Windows 95/98/SE/ME, the handles,

GDI-Objects and User Objects were 16 bits wide, resulting

in severe crashes when any of these climbed above 65535.

Ever since the advent of NT, these things were 32 bits wide,

meaning you could have 4294967296 if you had enough RAM.

(Since each handle consumes 4 Bytes you should have much more

than 16GB; these 2000 only waste 8 KB RAM and depending on

what they represent, about 8 to 16 MB virtual page memory.)

Don't worry, i have seen much leakier programs, this one's main

problem is actually the 300+ page errors per second that may

fragment free memory. If you are never turning your PC off like me

but sending it to hibernate daily, you can easily avoid problems if

you restart OD every five days. (me, on a dual 1GHz P3 with 512MB)

Another thing that is aimed at docklet developers with VC++ 6:

Don't waste your time in searching for the odd dangling pointer

that corrupts your DLLs heap resulting a break in the debugger

when you exit OD normally - if OD isn't responsible then the

Windows 2000 WindowBlinds hooking DLL is.

hth,

herd

PS:

Having inspected objectdock.exe with www.sysinternals.com's excellent

HandleEx, I can add the following:

Object Dock leaks 11 Process handles for each program that shows up

in the Docks taskbar. The handles are not released properly after

program termination.

You can't avoid the problem by disabling the task bar. There is more likely

an associated memory leak of 20 Bytes per handle. (guess)

#81423