On 10 Aug 2010, at 05:18, charlie wrote: > As you can see, the c string is successfully allocated from space in the > custom zone. But the NSString object is allocated from the default zone, > despite having called +[NSObject allocWithZone:]. > > Anyone know the trick to this?
Sounds like a bug to me. While zones are *discouraged* (they're very definitely an advanced topic and easily misused), I don't think they're actually deprecated. Anyway, the solution is to drop down a layer to Core Foundation. You can make an allocator that will use an NSZone easily enough using CFAllocatorCreate(), then pass that into CFStringCreate() as the allocator argument. Kind regards, Alastair. -- http://alastairs-place.net _______________________________________________ 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