I am having problem in releasing memories of views.
Just understand my problem in detail:
Consider I have view controllers-> view1controllers, view2controllers, view3controllers...and so on.
view2controllers is a part of view1controllers and view3controllers is part of view2controllers...
For example-
view1controllers.h
Now I switch from view1 to view2 using
Now I want to release the memory of view1controller (or its view). How should I do it?
Similarly, I am switching between other views. As a result object allocation tends to increase and never decrease. Is there any method so that I can release the memory of last view or didReceiveMemoryWarning could help me any ways?
Just tell me if I am not clear, but please reply soon.
Just understand my problem in detail:
Consider I have view controllers-> view1controllers, view2controllers, view3controllers...and so on.
view2controllers is a part of view1controllers and view3controllers is part of view2controllers...
For example-
view1controllers.h
Code:
#import <UIKit/UIKit.h>
@class view2controller;
@interface view1controller : UIViewController {
view2controller *v2Controller;
}
Now I switch from view1 to view2 using
view1controller.m
if (v2controller == nil)
self.v2controller = [[view2controller alloc] initWithNibName"view2" bundle:[NSBundle mainBundle]];
self.view = v2controller.view
Now I want to release the memory of view1controller (or its view). How should I do it?
Similarly, I am switching between other views. As a result object allocation tends to increase and never decrease. Is there any method so that I can release the memory of last view or didReceiveMemoryWarning could help me any ways?
Just tell me if I am not clear, but please reply soon.