autorelease
Objective C: How to release delegates in this situation
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[详细]
2023-02-02 10:33 分类:问答When to release the UIImage?
I use the following code to draw a subimage UIImage* subIm = getSubImage( large, rect ); [subIm drawInRect:self.bounds];[详细]
2023-02-01 05:20 分类:问答Leak or Crash - difference between autorelease and release
I have a comprehension question. This method is given: - (NSArray*)test { NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:@\"http://stackoverflow.com/\"]];[详细]
2023-02-01 03:34 分类:问答Clarification on IPhone Memory management(autorelease)
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...[详细]
2023-01-26 19:42 分类:问答Safe NSArray access
I expected objectAtIndex: to return a retained and autoreleased object for my use, but my tests with autorelease pools indicate they do not.[详细]
2023-01-26 17:30 分类:问答Does NSString componentsSeparatedByString: return autoreleased array?
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,[详细]
2023-01-26 16:38 分类:问答When using autorelease, when is it actually released?
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.[详细]
2023-01-22 23:55 分类:问答Autorelease object returned from NSArray?
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).[详细]
2023-01-21 17:30 分类:问答Objective C, Memory Management
1) What is the reason for the use of retain? For example, in a setter method: - (void) setCount: (int) input {[详细]
2023-01-20 09:47 分类:问答iPhone: memory leak on autoreleased object?
开发者_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[详细]
2023-01-20 08:52 分类:问答