From: Alexei S. <ale...@gm...> - 2012-07-05 04:34:30
|
Thanks. On Thu, Jul 5, 2012 at 12:13 AM, Charles Srstka < bas...@ch...> wrote: > Thanks. Here’s an updated patch. > > BTW, do you want me to try to make this code Tiger-compatible so we can > reconsolidate the 32-bit and 64-bit versions? They’ve already diverged > quite sharply in supported features, although the effects will only be seen > on legacy systems. I could do it by adding a few checks here and there; it > would make the code a bit uglier, but it’s doable. > What specific APIs are not available on Tiger that you're using in the new code? How do you plan to consolidate them? Btw, I glanced at your code and one comment I have is you seem to use autorelease pools a lot. I wonder if it's really necessary - can you just retain/release manually? Or are you calling APIs that autorelease stuff themselves? Re: your comment in the code about @autoreleasepool: I don't think we'll drop support for gcc any time soon, so the code will have to stay compatible with both, so no point adding a comment about a hypothetical scenario that's not going to happen. 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. -Alexei |