From: Alexei S. <ale...@gm...> - 2012-07-05 05:39:55
|
> > if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber10_5) > ... new API > else > ... old API > Is your new implementation strictly better than the clip_macosx.cpp one? Can you give a brief overview comparing them in terms of what works and what doesn't? This will help make it clear whether it makes sense to always prefer to use the new API code when running on 10.6 for 32-bit builds. (And hence whether it makes sense to consolidate them now like this.) > Still, if you do think the autorelease pools are really required, I > suggest making a C++ scoped object that will alloc an autorelease pool in > its ctor and release it in its dtor, which will eliminate the need for > draining the pool at all the early return points. > > > Yeah, that could work. > Could you make that change? I think it would be much cleaner than all the early-return cleanup in your current patch. -Alexei |