Theocacao
Leopard
Design Element
Comment on "CoreAnimation Sample Code: ArtGallery"
by Scott Stevenson — Nov 29
@Tony Arnold: the request for a "primer" on memory management (although I'd love more on manually managing memory than GC) while dealing with Core Animation/CGImageRefs/etc

I'm not sure offhand how to address what ssp mentions because I don't have a specific test case to work with. If you're using manual memory management, though, the rule is pretty simple: release anything you create.

This stuff is explained in a bit more detail in the Objective-C Tutorial I posted at Cocoa Dev Central. Sections 4 and 7 of that tutorial cover manual memory management.

The rules for CoreFoundation-style objects like CGImageRef are conceptually the same, though you use the CFRelease() function instead of sending the -release message to the object.
Back to "CoreAnimation Sample Code: ArtGallery"
Design Element

Copyright © Scott Stevenson 2004-2015