Possible Duplicate:
calling [myString release] does NOT decrement [myString retainCount]
I am in very big problem please help me to solve the same.
I am creating a view in custom way as
UIView *view = [self getCustomVIew:index];
[view release];
view = nil;
In getCustomVIew:index, I am allocating and returning the view. When I release view as
[view release];
it is not releasing the view from getCustomView:index and the reference count is not decremented.
Please help me to release the view returned from getCustomVIew:index and to maintain the memory size.
Instruments is just increasing the overall size of program when the views get deleted.
You don’t need to release view from that
getCustomVIewmethod. Returned view from should be already marked asautorelease