[vlc-commits] macosx: retain objects in MainMenu object

David Fuhrmann git at videolan.org
Fri May 10 10:45:47 CEST 2013


vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Thu May  9 19:21:50 2013 +0200| [2c1ec2e206cea95a137708e76ec4bff6c99dd279] | committer: David Fuhrmann

macosx: retain objects in MainMenu object

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

 modules/gui/macosx/MainMenu.m |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/modules/gui/macosx/MainMenu.m b/modules/gui/macosx/MainMenu.m
index c0b3d5b..6f16908 100644
--- a/modules/gui/macosx/MainMenu.m
+++ b/modules/gui/macosx/MainMenu.m
@@ -64,7 +64,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
     } else {
         _o_sharedInstance = [super init];
 
-        o_ptc_translation_dict = [NSDictionary dictionaryWithObjectsAndKeys:
+        o_ptc_translation_dict = [[NSDictionary alloc] initWithObjectsAndKeys:
                       _NS("Track Number"),  TRACKNUM_COLUMN,
                       _NS("Title"),         TITLE_COLUMN,
                       _NS("Author"),        ARTIST_COLUMN,
@@ -77,8 +77,9 @@ static VLCMainMenu *_o_sharedInstance = nil;
                       _NS("URI"),           URI_COLUMN,
                       nil];
         // this array also assigns tags (index) to type of menu item
-        o_ptc_menuorder = @[TRACKNUM_COLUMN, TITLE_COLUMN, ARTIST_COLUMN, DURATION_COLUMN,
-                            GENRE_COLUMN, ALBUM_COLUMN, DESCRIPTION_COLUMN, DATE_COLUMN, LANGUAGE_COLUMN, URI_COLUMN];
+        o_ptc_menuorder = [[NSArray alloc] initWithObjects: TRACKNUM_COLUMN, TITLE_COLUMN,
+                           ARTIST_COLUMN, DURATION_COLUMN, GENRE_COLUMN, ALBUM_COLUMN,
+                           DESCRIPTION_COLUMN, DATE_COLUMN, LANGUAGE_COLUMN, URI_COLUMN, nil];
     }
 
     return _o_sharedInstance;
@@ -110,6 +111,9 @@ static VLCMainMenu *_o_sharedInstance = nil;
 
     [self releaseRepresentedObjects:[NSApp mainMenu]];
 
+    [o_ptc_translation_dict release];
+    [o_ptc_menuorder release];
+
     [super dealloc];
 }
 



More information about the vlc-commits mailing list