[vlc-devel] [PATCH] fixed GDI leaks
Sergey Radionov
rsatom at gmail.com
Fri Sep 7 16:39:54 CEST 2012
---
common/win32_fullscreen.h | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/common/win32_fullscreen.h b/common/win32_fullscreen.h
index d60800d..c30cb6b 100644
--- a/common/win32_fullscreen.h
+++ b/common/win32_fullscreen.h
@@ -39,6 +39,17 @@ struct VLCViewResources
hPlayBitmap(0), hVolumeBitmap(0), hVolumeMutedBitmap(0),
hBackgroundIcon(0)
{};
+ ~VLCViewResources()
+ {
+ if( hNewMessageBitmap ) DeleteObject( hNewMessageBitmap );
+ if( hFullscreenBitmap ) DeleteObject( hFullscreenBitmap );
+ if( hDeFullscreenBitmap ) DeleteObject( hDeFullscreenBitmap );
+ if( hPauseBitmap ) DeleteObject( hPauseBitmap );
+ if( hPlayBitmap ) DeleteObject( hPlayBitmap );
+ if( hVolumeBitmap ) DeleteObject( hVolumeBitmap );
+ if( hVolumeMutedBitmap ) DeleteObject( hVolumeMutedBitmap );
+ if( hBackgroundIcon ) DestroyIcon ( hBackgroundIcon );
+ }
HANDLE hNewMessageBitmap;
HANDLE hFullscreenBitmap;
--
1.7.7.1.msysgit.0
More information about the vlc-devel
mailing list