Hello Ivan and Luboš,

thank you for clarification,
right now it's more clear, I think, due CF function is not automatically put 
bridged(or not) objects  into autorelease pool, e.g. 
CFStreamCreatePairWithSocket,
client should release it manually, like in 
https://github.com/robbiehanson/CocoaAsyncSocket/blob/master/GCD/GCDAsyncSocket.m
 with readStream/writeStream.

BR,
Alexey

From: i...@vucica.net
Date: Tue, 12 May 2015 21:50:35 +0100
Subject: Re: using autorelease in apple's CF
To: lu...@dolezel.info
CC: gnustep-dev@gnu.org

Alexey,
To further clarify:- Core Foundation: base libraries exposing a C API that 
implement strings, arrays, etc. Some free software/open source implementations: 
Apple's implementation, GNUstep's corebase- Foundation: base libraries exposing 
an Objective-C API that implement strings, arrays, etc.. Some free 
software/open source implementations: Apple's implementation, GNUstep's base, 
Cocotron- You can add (generally) add Core Foundation objects into Foundation's 
autorelease pool, and (mostly) send them certain Objective-C messages; that is, 
they pretend to be/are Objective-C objects- objc_autorelease, based on its 
name, would exist in the Objective-C runtime (e.g. libobjc2), and it doesn't. - 
objc_release is provided by the runtime for the sake of ARC, not because it is 
strictly necessary for an implementation of Foundation written in Objective-C.
HTH
On Tue, May 12, 2015 at 9:34 AM, Luboš Doležel <lu...@dolezel.info> wrote:
On 05/12/2015 09:34 AM, Alexey Perevalov wrote:

> Hello gnustep developers!

>

> I'm interesting in using autorelease pool from apple's CF

> (http://www.opensource.apple.com/source/CF/,

> http://www.opensource.apple.com/source/CFNetwork/).

> In gnustep implementation autorelease message ([(object) autorelease])

> for allocated object is sending. I'm talking about

> svn.gna.org/svn/gnustep/libs/base/trunk, whole implementation was made

> on objective C. But CF published on opensource.apple.com written on C.

> So the question how they are putting objects into autorelease pool? My

> assumption, somewhere should be objc_autorelease invocation, but where?

>

> BR

> Alexey



You're confusing things. CF doesn't have any functions for

autoreleasing. You can only autorelease via Foundation, which was never

open sourced by Apple.



--

Luboš Doležel



_______________________________________________

Gnustep-dev mailing list

Gnustep-dev@gnu.org

https://lists.gnu.org/mailman/listinfo/gnustep-dev




_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/gnustep-dev                              
          
_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to