I am using custom delegate objects to do some cleanup tasks after a request finishes. ASIHTTPRequest doesn\'t retain delegates so I can\'t autorelease them. Right now this is how I am allocating and r
I use the following code to draw a subimage UIImage* subIm = getSubImage( large, rect ); [subIm drawInRect:self.bounds];
I have a comprehension question. This method is given: - (NSArray*)test { NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:@\"http://stackoverflow.com/\"]];
I know a similar question has been answered before here, but I just want to make sure I understand it a little bit better.Here is my scenario...
I expected objectAtIndex: to return a retained and autoreleased object for my use, but my tests with autorelease pools indicate they do not.
In the following method, I\'m unsure of why releasing one of the arrays leads to an exception. The only reason that I could see, would be if componentsSeparatedByString returns an autoreleased array,
Sometimes I wonder when something gets auto开发者_运维知识库released. I added an NSLog in the dealloc of various objects, but I couldn\'t find anything useful.
I\'m writing an NSArray category to include the -objectAtRandom message that returns an object from a random index (something similar to Python\'s choice).
1) What is the reason for the use of retain? For example, in a setter method: - (void) setCount: (int) input {
开发者_JAVA技巧I am using the XMLParser class, which contains an array with XMLElement objects. The XMLElement is being allocated using the autorelease operation. However, for some reason I\'m getting