Re: Stack-based C++ class to wrap NSAutoreleasePool
Re: Stack-based C++ class to wrap NSAutoreleasePool
- Subject: Re: Stack-based C++ class to wrap NSAutoreleasePool
- From: Scott Ribe <email@hidden>
- Date: Sat, 14 Nov 2009 10:14:41 -0700
- Thread-topic: Stack-based C++ class to wrap NSAutoreleasePool
> So, is there any reason why I shouldn't do this?
No. You don't see much of this because much of the time wrapping Obj-C
memory management in C++ stack classes is a sign that Obj-C hasn't yet been
really grokked. (Example, wrapping retain & autorelease in the ctors & dtor
of a base class that holds an id, and using those all over the place is a
sign that the developer hasn't yet grokked how the autorelease idioms mean
that most of the time you don't have to do *anything* about memory
management for objects you don't hold on to.)
But the boundaries between Obj-C and C++ frameworks are exactly where this
kind of stuff is useful.
--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 722-0567 voice
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden