gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Keeping a list of blocks


From: David Chisnall
Subject: Re: Keeping a list of blocks
Date: Thu, 17 Apr 2014 15:59:58 +0100

On 17 Apr 2014, at 15:43, Ivan Vučica <address@hidden> wrote:

> Is this just a list of blocks that will be run in the very next run loop 
> step? If so, I see no other way except some kind of an array. Long term 
> optimization might be a fixed-size C array allocated per-runloop that 
> overflows into a CFArray if required, but CFArray should probably be smart 
> enough to be fast enough even without doing such tricks.

Calling _Block_copy() will cause at least one, and typically several, memory 
allocations, so even a linked list is not likely to add much overhead beyond 
this...

Given that blocks are ARC-managed types, any Objective-C container should work 
correctly.

David


-- Sent from my STANTEC-ZEBRA




reply via email to

[Prev in Thread] Current Thread [Next in Thread]