views:

107

answers:

1

i am trying to launch a view from a button. When I do it causes a memory link but I can see why.

CamViewController *dvController = [[CamViewController alloc] initWithNibName:@"Cam_View" bundle:[NSBundle mainBundle]];
dvController.camType = 1; 
[self.navigationController pushViewController:dvController animated:YES]; 
[dvController release];

any ideas?

+2  A: 

The problem is most likely in your CamViewController implementation. If I were to guess, you are creating a bunch of objects in your xib file and they are not getting released in the Controllers dealloc.

It is important to remember that you are responsible for releasing your IBOutlet attached objects in your class.

Brad Smith
no thats not it. i double checked and yes im releasing all my IBOutlets and i am. the leak happens on the way TO the CamViewController.
iHorse