Closed balram3429 closed 11 years ago
The library does not maintain any stack. You do not need to worry about memory consumption. :)
I am Using ARC & I am worried because every time I load a new controller that loads data from Google Map, increases the run time size of app. So I was concerned. I forgot to mention about NVSlideMenuController
as entitlement on my about page of App. But I am doing that now in my Current version of App.
Okay, I reproduced that. I'm working on it.
According to my tests, no leaks in NVSlideMenuController
with and without ARC enabled. Your code may leak somewhere (strong ref cycle ?).
I saw a significant rise in memory usage during the run time, So I reported. Please see this, as how I am using your control.
This is how I am loading a Navigation controller with NVSideMenuController.
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:[self prepareSideMenuFrame]];
nav.navigationBarHidden = YES;
nav.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self.navigationController presentViewController:nav animated:YES completion:^{
[self hideIndicator];
}];
This method returns an instance of NVSlideMenuController
:
- (NVSlideMenuController *)prepareSideMenuFrame {
self.sideMenuController = [[btSideMenuViewController alloc]init];
btHomeViewController *selectionController = [[btHomeViewController alloc]init];
self.frameViewCtrllr = [[NVSlideMenuController alloc]initWithMenuViewController:self.sideMenuController andContentViewController:selectionController];
return self.frameViewCtrllr;
}
Sorry, this is the wrong place to ask for your memory issues. Please post on StackOverflow instead.
Thanks. I am looking for strong references.
I am writing this to you in reference to my earlier question being responded by your team here : https://github.com/nverinaud/NVSlideMenuController/issues/21#issuecomment-25626978
if ([self.slideMenuController.contentViewController isKindOfClass:[HomeViewController class]]) { [self.slideMenuController closeMenuAnimated:YES completion:nil]; } else { HomeViewController homeVC = /* get the new instance or reuse one */; [self.slideMenuController closeMenuBehindContentViewController:homeVC animated:YES ...]; }
I am satisfied with your earlier answer but my doubts are here. 1) Suppose I load an Item
HomeViewController
first. (control followsif
route as above & loadsHomeViewController
) 2) Next I load a new ItemAboutViewController
. (control followsif
route as above & loads aAboutViewController
) 3) Again If I load an ItemHomeViewController
, What happens to the instance that was loaded in Step 1 ? (control always followselse
route because theself.slideMenuController.contentViewController
is an instance ofAboutViewController
)Don't you think that instance created at step1 is somewhere there on the stack but not on top. Isn't that causing a memory lump.? So if my
HomeViewController
loaded in step1 loads some data of 10Mb, then the new instance being created at step3 will certainly be making the size of app tp 20MB (since the step1 instance & step2 instance are there on the stack now.) I hope, I have made you clear about my question. Kindly clarify.