On 16 Mar 2018, at 08:51, Fred Kiefer <[email protected]> wrote:
> 
> 1) David would probably point you to the usage of ARC but as far as I 
> understand you are using gcc and this is no option for your.

Note that even if you’re using GCC, if you’re using libobjc2 then you can call 
the ARC objc_retainAutoreleasedReturnValue function explicitly, rather than 
sending a -retain message to an autoreleased value.  This will pop the top 
object from the autorelease pool and transfer ownership of it to the caller.  
The caller is then responsible for releasing it.

In a system with realtime requirements, autorelease pools are a really bad 
idea.  They will introduce pauses proportional to the total number of objects 
in the pool when they are destroyed.  Most realtime systems don’t allow 
allocating objects at all, so Objective-C is probably exactly the wrong choice 
for them.

David


_______________________________________________
Discuss-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to