I took care of a memory leak related to the alloc object, however I think I have fouled up my code as now my video clip does not play. I believe that I have caused the device to release before the cli
I see in some sample code that autorelease is used. I am not familiar with the instances when this is required. For example, if I create an annotation object
Let\'s say I have a dictionary full of objects for keys that may or may not be there. What is the standard practice for checking wh开发者_运维知识库ether this key exists or not?
is this line of code correct re memory management (re NSDate copy)? I have a class with properties: @property (nonatomic, retain) NSDate* start;
I often see something like the following: UIBarButtonItem *anotherButton = [[UIBarButtonItem alloc] initWithTitle:@\"Show\" style:UIBarButtonItemStylePlain target:self action:@selector(refreshPropert
Scenario- I have a method that returns an object retrieved from an NSMutableArray similar to the following code which has been simplified (assume that \"myArray\" and \"currentIndex\" are iVars for th
At a project I\'m currently working on I\'m working through code of my predecessors. One of the things I encounter here and there are getters like this:
Finally the objective-c memory management caught me. I\'m fighting with a problem now for 2 days. I´m new to Objective C and can\'t solve the problem by my own.
If we useNSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; then what开发者_开发问答 method is used, either drain or release for lates iOS.no garbage collection on iOS.
I\'m using [self retain] to hold a开发者_如何学Cn object itself, and [self release] to free it elsewhere. This is very convenient sometimes. But this is actually a reference-loop, or dead-lock, which