Re: [Camelbones-devel] When do you need to retain()?
Brought to you by:
shermpendley
From: Matt S. <ma...@se...> - 2010-11-02 21:27:57
|
On Tue, 2 Nov 2010, Sherm Pendley wrote: > On Tue, Nov 2, 2010 at 1:39 PM, Matt Sergeant <ma...@se...> wrote: >> Just a simple question - when do I need to retain()/release() things in >> CamelBones? I assume it's not done automagically? > > It's semi-automatic. When an Objective-C object is passed to Perl, a > Perl object "wrapper" is created and a -retain is sent to the ObjC > object. When the "wrapper" object is destroyed by Perl (which happens > according to Perl's normal scoping & reference counting rules), its > destructor sends the corresponding -release to the object it wraps. OK, so it's fair to say that my current use of retain/release in DVDSpanner is superfluous? Matt. |