class
DbgGuiLeak
{
public:
explicit DbgGuiLeak ()
{
_guiResCount = ::GetGuiResources (::GetCurrentProcess (),
GR_GDIOBJECTS);
}
~DbgGuiLeak ()
{
int leaks = ::GetGuiResources (::GetCurrentProcess (),
GR_GDIOBJECTS) - _guiResCount;
if (leaks != 0)
{
std::cout << "Gui Resources Leaked: " << leaks << std::endl;
}
}
private:
unsigned _guiResCount;
} ;
{
public:
explicit DbgGuiLeak ()
{
_guiResCount = ::GetGuiResources (::GetCurrentProcess (),
GR_GDIOBJECTS);
}
~DbgGuiLeak ()
{
int leaks = ::GetGuiResources (::GetCurrentProcess (),
GR_GDIOBJECTS) - _guiResCount;
if (leaks != 0)
{
std::cout << "Gui Resources Leaked: " << leaks << std::endl;
}
}
private:
unsigned _guiResCount;
} ;