Re: question about "read-only" rule for Memory Management

2010-04-26 Thread Philip Mobley
On Apr 26, 2010, at 10:50 PM, Ken Thomases wrote: >> No. The "get" prefix is used for return-via-pointer. For example, >> -[NSString getCharacters:range]. > > As documented here >

Re: question about "read-only" rule for Memory Management

2010-04-26 Thread Ken Thomases
On Apr 26, 2010, at 11:39 PM, Kyle Sluder wrote: > On Mon, Apr 26, 2010 at 6:57 PM, Philip Mobley wrote: >> Question: is the BELOW method named appropriately? >> >> - (UIImage *) getImageWithTag:(NSString *)tag; > > No. The "get" prefix is used for return-via-pointer. For example, > -[NSString

Re: question about "read-only" rule for Memory Management

2010-04-26 Thread Kyle Sluder
On Mon, Apr 26, 2010 at 6:57 PM, Philip Mobley wrote: > Question:  is the BELOW method named appropriately? > > - (UIImage *) getImageWithTag:(NSString *)tag; No. The "get" prefix is used for return-via-pointer. For example, -[NSString getCharacters:range]. --Kyle Sluder

Re: question about "read-only" rule for Memory Management

2010-04-26 Thread Jens Alfke
On Apr 26, 2010, at 6:57 PM, Philip Mobley wrote: > Question: is the BELOW method named appropriately? > > - (UIImage *) getImageWithTag:(NSString *)tag; Usually Cocoa method names drop the “get” prefix, so ideally the name would just be “imageWithTag:”. But yes, there’s no need to say “copy

question about "read-only" rule for Memory Management

2010-04-26 Thread Philip Mobley
Assume that an array of images is loaded at the start of the app. There are a number of views which will be displaying multiple "copies" of the image, but they will be accessing the image array as a read-only property, and I do not plan to have these views adjust the reference count for each i