On Sun, Sep 6, 2009 at 4:13 AM, DairyKnight<dairykni...@gmail.com> wrote: > I'm working on a program which does lots of switching between CGImage, > CIIMage and NSImage. One thing I found out is > that it seems if you get a CGImage from NSBitmapImageRep: > > CGImage *cgImg = [NSBitmapImageRep CGImage];
Nothing about the method name suggests that it returns an object with an outstanding reference (i.e. it doesn't have copy in it's name, it doesn't start with copy or new, etc.). Absent any of these indicators (described in <http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmRules.html#//apple_ref/doc/uid/20000994-BAJHFBGH>) you must assume that you do not hold an outstanding reference, and therefore must not release it. Once you commit, to memory, the 4 rules described at the above link, all the information you need to determine the status of a returned object are in the method name. -- Clark S. Cox III clarkc...@gmail.com _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com