The table view works fine however when I leave the view and come back to it the second time, I get a memory leak. Probably something in the viewDidLoad just not sure.
I
Please see my response here: Deallocating and removing UiButtons
It contains an explanation of when you should retain/release or rely on autorelease. Apply these rules to your code above. In short, anytime you alloc anything, you should be following it with a call to release on that object. If you don't, you'll have a memory leak.
Update:
You're not releasing the activityIndicator that you create here.
- (void)viewDidLoad {
[super viewDidLoad];
// ...
activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
// ...
[self.view addSubview:activityIndicator];
}