check retención cuenta
Yo estoy haciendo esto
UIImageView *backgroundImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mainback.jpg"]];
[self.view addSubview:backgroundImage];
NSLog(@" retain count1 : %d " , [backgroundImage retainCount]);
[self.view sendSubviewToBack:backgroundImage];
[backgroundImage release];
NSLog(@" retain count2 : %d " , [backgroundImage retainCount]);
Teng
retain count1 : 2
retain count2 : 1
1) en la función dealoc puedo recibir mensajes como:
- (void)dealloc{
NSLog(@" retain count2 : %d " , [backgroundImage retainCount]);
[super dealloc];
}
Y 2) por fin conseguí retener conteo1 paraimagen de fond entonces está bien o debería ser 0 (cero) ??
Gracias.