-(id)init
{
if (self = [super init])
{
self.dmrPlaylists = [[[NSMutableArray alloc] initWithCapacity:0] autorelease];
}
}
-(void)dealloc
{
[self.dmrPlaylists release];
}
-(DMRPlaylist *)getDMRPlaylistByUUID:(NSString *)deviceUUID
{
if (deviceUUID == nil)
return nil;
for(int i = 0; i < self.dmrPlaylists.count; i++)
{
DMRPlaylist * dmrPlaylist = [self.dmrPlaylists objectAtIndex:i];
if([dmrPlaylist.deviceUUID isEqualToString:deviceUUID])
{
return dmrPlaylist;
}
}
return nil;
}
Memory(Core Foundation/Object-C) 调用者此时不拥有的对象的引用计数不正确递减。
提前致谢。