Hi i would like to know what is diff b/w @autorleasepool and release and both are using for decreasing retain count then what is diff b/w both of them and i wrote below two cases what happen both of this cases can some one explain me please...
case1:-
-(void)sendMessage{
@autoreleasepool{
NSString *name1 =[NSString alloc]init];
NSString *name2 =[NSString alloc]init];
}
}
case2:-
-(void)sendMessage{
NSString *name1 =[NSString alloc]init];
NSString *name2 =[NSString alloc]init];
[name1 release];
[name2 release];
}