From c94d31f6d9bbdb9a97030be2446b6a60c6b2b1d7 Mon Sep 17 00:00:00 2001 From: matthewleon Date: Sun, 9 Mar 2008 00:22:48 +0000 Subject: [PATCH] Dealloc for PlaylistEntry seems to shrink memory leak. --- Playlist/PlaylistEntry.m | 15 +++++++++++++++ Spotlight/SpotlightPlaylistEntry.m | 6 +++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Playlist/PlaylistEntry.m b/Playlist/PlaylistEntry.m index 0b1524f41..7f1cec2b7 100644 --- a/Playlist/PlaylistEntry.m +++ b/Playlist/PlaylistEntry.m @@ -79,6 +79,21 @@ return [NSString stringWithFormat:@"PlaylistEntry %i:(%@)", self.index, self.URL]; } +- (void)dealloc +{ + self.errorMessage = nil; + + self.URL = nil; + self.artist = nil; + self.album = nil; + self.genre = nil; + self.year = nil; + self.track = nil; + + self.endian = nil; + [super dealloc]; +} + // Get the URL if the title is blank @synthesize title; - (NSString *)title diff --git a/Spotlight/SpotlightPlaylistEntry.m b/Spotlight/SpotlightPlaylistEntry.m index 86784d81d..dab1b4d57 100644 --- a/Spotlight/SpotlightPlaylistEntry.m +++ b/Spotlight/SpotlightPlaylistEntry.m @@ -78,13 +78,13 @@ static NSDictionary *importKeys; // Length is no longer a dependent key + (NSSet *)keyPathsForValuesAffectingLength { - return Nil; + return nil; } - (void)dealloc { - spotlightTrack = Nil; - length = Nil; + spotlightTrack = nil; + length = nil; [super dealloc]; }