Skip to content

Commit

Permalink
macosx: retain objects in MainMenu object
Browse files Browse the repository at this point in the history
  • Loading branch information
David Fuhrmann committed May 10, 2013
1 parent 898a0ce commit 2c1ec2e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions modules/gui/macosx/MainMenu.m
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ - (id)init
} 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,
Expand All @@ -77,8 +77,9 @@ - (id)init
_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;
Expand Down Expand Up @@ -110,6 +111,9 @@ - (void)dealloc

[self releaseRepresentedObjects:[NSApp mainMenu]];

[o_ptc_translation_dict release];
[o_ptc_menuorder release];

[super dealloc];
}

Expand Down

0 comments on commit 2c1ec2e

Please sign in to comment.