Questions tagged [viewdidunload]
62 questions
2
votes
2 answers
Where to release all my views if i received memory warnings?
If I am receiving memory warnings where exactly I have to release all my views & data ?
Whether I have to release in
- (void)didReceiveMemoryWarning or in
- (void)viewDidUnload

Tariq
- 9,861
- 12
- 62
- 103
2
votes
3 answers
releasing in viewDidUnload makes any difference or not?
I am new to iPhone development.
I am using some buttons and labels in my app. I am releasing all these buttons and labels in dealloc function.
I am also releasing them in viewDidUnload.
- (void)viewDidUnload
{
[super viewDidUnload];
self.ans1 =…

iUser
- 1,075
- 3
- 20
- 49
2
votes
1 answer
What is the pair method for viewDidLoad if viewDidUnload is deprecated?
Is it dealloc or which method? If I setup some code in viewDidLoad, I want to unistall this setup from the pair method of viewDidLoad.. For example viewDidLoad & viewDidDisappear combo is not always clever combination. And sometimes is better to do…

luky
- 2,263
- 3
- 22
- 40
2
votes
1 answer
Cordova iOS custom Plugin : handle memory warning
I'm developing an iOS app that use cordova(2.1), and some custom plugins.
The problem that I'm trying to face is the following :
When I show my plugin(basically a camera plugin with more features than the built-in
cordova plugin) sometime I receive…

oiledCode
- 8,589
- 6
- 43
- 59
1
vote
0 answers
UIViewController not released when added to a UINavigationController
Below is reduced bit of code to demonstrate a problem I am a having.
I allocate and init a view controller. The init method is the standard Objective C init, so the view controller isn't doing anything yet. Then I create a navigationController…

Jonoogle
- 66
- 4
1
vote
3 answers
Object release in Objective-C: Why release an object twice in viewDidUnload and dealloc method?
I have a question about object release in objective-c. I saw some sample codes in Chapter 9 of "Beginning iphone 4 Development"(Page 287). The sample code release an object twice: both in viewDidUnload and dealloc method. Here are the sample…

Sam Wei
- 99
- 4
- 11
1
vote
1 answer
iOS: viewWillUnload?
For a UIViewController, in case its view is unloaded, I want to save (to an NSString ivar) the text string that a user has entered into a UITextView (or UITextField).
Where should I do this?
I'm assuming the UITextView will already have been reset…

ma11hew28
- 121,420
- 116
- 450
- 651
1
vote
1 answer
Way to remove all -viewDidUnload from project's view controllers
As Apple's Official Doc said:
-viewDidUnload is deprecated in iOS 6.0. Views are no longer purged under low-memory conditions and so this method is never called.
Meanwhile, it's better to remove all -viewDidUnload implements from projects that the…

Kjuly
- 34,476
- 22
- 104
- 118
1
vote
1 answer
Memory management of view while using NavigationController
I changed navigation in my application from using UITabBarController to u UINavigationController. I.e. former solution (1st version) was based only on the TabBarController - 4 ViewControllers (one simple TableView, one simple custom view and one…

Vitek
- 31
- 6
1
vote
0 answers
Method for release resources in iOS 6.0
Possible Duplicate:
iOS 6 - viewDidUnload migrate to didReceiveMemoryWarning?
In iOS 6.0 viewDidUnload: and other something methods has been deprecated. If I need release some resources like UIWebView or network connection, what method should I…

Ilya Ilin
- 2,283
- 21
- 27
1
vote
0 answers
viewDidUnload deprecation, but what about strong references to secondary view?
In iOS6 the method viewDidUnload became deprecated, the memory management has changed a lot for a UIViewController. Here is a little brief about the new patterns.
The part that occupies more memory in a view controller is the view (and of course…

Andrea
- 26,120
- 10
- 85
- 131
1
vote
2 answers
When to call [super viewDidLoad] and [super viewDIdUnload]?
In most of my code, I have the following setup for viewDidLoad and viewDidUnload:
- (void)viewDidLoad
{
[super viewDidLoad];
//do stuff...
}
- (void)viewDidUnload
{
[super viewDidUnload];
//do stuff...
}
However, I got to…

MikeS
- 3,891
- 6
- 35
- 51
1
vote
2 answers
Will Apple reject an app for manually calling viewDidUnload
viewDidUnload is no longer called in iOS6, so as a workaround for an app that does some necessary things in viewDidUnload I have done this:
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// only want to do this on iOS…

soleil
- 12,133
- 33
- 112
- 183
1
vote
3 answers
iOS - viewDidUnload not called, but didReceiveMemoryWarning is called
Trying to hunt down the cause of crashing on certain devices. I am noticing that my view controllers are receiving didReceiveMemoryWarning, but NOT viewDidUnload. And according to Apple:
you would not use didReceiveMemoryWarning to release…

soleil
- 12,133
- 33
- 112
- 183
1
vote
1 answer
Memory issue with iphone app development
I am developing an iphone application which uses very simple interface and does database handling at the backend. I am enabling ARC OPTION as well.
My viewDidLoad method is as follows:
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any…

abhishek behl
- 23
- 1
- 8