Reputation: 342
Which will take care in ARC in ios 5.0 or ios 5.1
i am allocated object and need not to release that object in ARC, those ARC take care itself
UIView *customView = [[UIView alloc]init];
[customView setFrame:CGRectMake(kRect)];
[self.view addSubview: customView];
[customView release];
in ARC customView release it will handle by it self.
What happened if i said release to customView
Upvotes: 0
Views: 105
Reputation: 649
ARC will take care of your memory but stile you want to remove a object from memory you can do simply object=nil; then arc knows that the variable has no use and remove's it from memory.
Upvotes: 0
Reputation: 4409
Need not release an object its ARC will take care about the memory once your project create select the ARC auto retain count! which will take care about the memory management
Upvotes: 1
Reputation: 21221
You cant call release
since ARC will throw an error if you do so
Release
is not available in ARC environment, your project wont build
Upvotes: 2