views:

44

answers:

1

I have a leak in my initWithCoder. Can anyone help me see what's wrong?

In my custom classes I have tried both using self. and without...

-(id) initWithCoder: (NSCoder *) decoder {  
    if( self = [super init] )
    {
        persons = [[decoder decodeObject] retain];
        title = [[decoder decodeObject] retain];
    }
    return self;
 }

-(id) initWithCoder: (NSCoder *) decoder {
    if( self = [super init] )
    {
       self.name = [decoder decodeObject];
       self.address = [decoder decodeObject];
       self.email = [decoder decodeObject];
       self.comment = [decoder decodeObject];
    }   
    return self;
}


NSData *getData = [[[NSData alloc] initWithContentsOfFile:path] autorelease];

Group = [[NSKeyedUnarchiver unarchiveObjectWithData:getData] retain];


......
......
......



[Group release];
A: 

Are they being released in -dealloc?

tc.
yep, they are released
kitsos