I have an application with four main tabs. I am encountering a 4k memory leak on about every sixth to eighth tab change. Not much, I know, but it's bugging me. The ONLY place I can figure the leak is in the following code, although I can't for the life of me see how the following code could be causing the leak. Is this code leaking memory...
You should check the return from DestroyAcceleratorTable() before nulling hAccel.
It will return nonzero if it succeeds and zero on failure. It will fail if CreateAcceleratorTable or LoadAccelerators function are called more than once.