The bitmaps you pass to the menu items are getting leaked every time the menu is invoked in explorer. Please move these HBITMAPs to class members of CShellExt, create them once in the constructor or on demand, and then call DeleteObject on them in the destructor.
Thank you for the hint. As far as I can see this was only an issue when running on win2k/xp, on later systems this is handled by the IconBitmapUtils class. Should still be changed of course.
The bitmaps you pass to the menu items are getting leaked every time the menu is invoked in explorer. Please move these HBITMAPs to class members of CShellExt, create them once in the constructor or on demand, and then call DeleteObject on them in the destructor.