views:

19

answers:

1

In the Resource Programming Guide it gives 2 methods to load image resources, using Quartz & C vs ObjectiveC . Can anyone tell me what the difference is? Are both identical in terms of performance with a large number of images?

A: 

First of all, it's technically Quartz & C vs Cocoa & Objective-C. Objective-C is just a language—it is not inherently tied to the Cocoa frameworks.

Under the hood, a lot of Cocoa is just a wrapper for Quartz and CoreFoundation, so the two methods you mentioned should be identical in terms of functionality. Regarding performance, I'd imagine loading image resources through Cocoa would be marginally slower than doing it directly through Quartz, but that's only because of the slight overhead of Objective-C message sending and whatnot. For all intents and purposes, though, the two methods should only differ in terms of how you write your code (procedural C vs. object-oriented Objective-C).

htw