[vlc-devel] commit: macosx: Make sure the o_info object gets released even if the nib has not been loaded . (Pierre d'Herbemont )

git version control git at videolan.org
Sun Jul 13 17:08:50 CEST 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Sun Jul 13 17:10:31 2008 +0200| [4ad2f8dc6a89e4349ecfa1ad6f0c4285d86612d3]

macosx: Make sure the o_info object gets released even if the nib has not been loaded.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4ad2f8dc6a89e4349ecfa1ad6f0c4285d86612d3
---

 modules/gui/macosx/intf.h         |    3 ++-
 modules/gui/macosx/intf.m         |    4 ++--
 modules/gui/macosx/playlistinfo.h |    2 ++
 modules/gui/macosx/playlistinfo.m |    2 +-
 4 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/modules/gui/macosx/intf.h b/modules/gui/macosx/intf.h
index 3dbe618..718a83b 100644
--- a/modules/gui/macosx/intf.h
+++ b/modules/gui/macosx/intf.h
@@ -93,6 +93,7 @@ struct intf_sys_t
  * VLCMain interface
  *****************************************************************************/
 @class AppleRemote;
+ at class VLCInformation;
 @interface VLCMain : NSObject
 {
     intf_thread_t *p_intf;      /* The main intf object */
@@ -105,7 +106,7 @@ struct intf_sys_t
     id o_bookmarks;             /* VLCBookmarks   */
     id o_embedded_list;         /* VLCEmbeddedList*/
     id o_interaction_list;      /* VLCInteractionList*/
-    id o_info;                  /* VLCInformation */
+    VLCInformation * o_info;                  /* VLCInformation */
 #ifdef UPDATE_CHECK
     id o_update;                /* VLCUpdate      */
 #endif
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 43ff84b..459ca86 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -1751,9 +1751,9 @@ end:
     if( nib_bookmarks_loaded )
         [o_bookmarks release];
 
-    if( nib_info_loaded )
+    if( o_info )
     {
-        [o_info stop];
+        [o_info stopTimers];
         [o_info release];
     }
 
diff --git a/modules/gui/macosx/playlistinfo.h b/modules/gui/macosx/playlistinfo.h
index 82cb582..7138107 100644
--- a/modules/gui/macosx/playlistinfo.h
+++ b/modules/gui/macosx/playlistinfo.h
@@ -102,6 +102,8 @@
 }
 
 - (void)initPanel;
+- (void)stopTimers;
+
 - (IBAction)metaFieldChanged:(id)sender;
 - (IBAction)saveMetaData:(id)sender;
 - (void)initMediaPanelStats;
diff --git a/modules/gui/macosx/playlistinfo.m b/modules/gui/macosx/playlistinfo.m
index c0dfa25..858d55c 100644
--- a/modules/gui/macosx/playlistinfo.m
+++ b/modules/gui/macosx/playlistinfo.m
@@ -119,7 +119,7 @@ static VLCInfo *_o_sharedInstance = nil;
     [self updatePanelWithItem:p_item];
 }
 
-- (void)stop
+- (void)stopTimers
 {
     /* make sure that the timer is released in any case */
     if( o_statUpdateTimer && [o_statUpdateTimer isValid] )




More information about the vlc-devel mailing list