[vlc-commits] fixed GDI leaks
Sergey Radionov
git at videolan.org
Mon Sep 10 14:33:38 CEST 2012
npapi-vlc | branch: master | Sergey Radionov <rsatom at gmail.com> | Fri Sep 7 21:39:54 2012 +0700| [468b78de6c52263af0ce2bbe89242979834c9313] | committer: Rafaël Carré
fixed GDI leaks
Signed-off-by: Rafaël Carré <funman at videolan.org>
> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=468b78de6c52263af0ce2bbe89242979834c9313
---
common/win32_fullscreen.h | 11 +++++++++++
1 file changed, 11 insertions(+)
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;
More information about the vlc-commits
mailing list