In a chat based app I have UITableView
which display all friends name, on didSelectRowAtIndex
I am pushing to chatViewController
using navigationcontroller
push
method.
I have two confusion:
1> When I push chatViewController
I do it like this
chatViewController *cVc = [[chatViewController alloc]initWithFriendName:@"the name" andId:@"the id"];
There can be 10 or 50 or 100 friends, is it correct to call alloc init
for every friend?
2> When user tap back button to go back to friends list, what happen to chatViewController's
current instance when it will be destroyed to free memory?