Patch for #7170716, crash in OSXAPP_SetApplicationDelegate
    Marco Dinacci 
    marco.dinacci at gmail.com
       
    Mon Jun 11 09:48:42 PDT 2012
    
    
  
Hi,
> You don't need to retain blocks when adding them to a collection. The collection implicitly retains them. The blocks will be released once the collection is released.
I know, I'm not suggesting that. I'm saying that those blocks literals
are created on the stack and that you have to copy them if you want to
keep them around. The retain performed by the collection is not
enough.
> The root problem may be that the delegate is getting released, but I'd need to review the surrounding code more carefully to determine that.
the crash normally happens when accessing the block inside the queue.
void (^event)() = (void (^)())[self->queue objectAtIndex: i];
which hints to the fact that the objects inside the array are "gone".
Best,
Marco
    
    
More information about the macosx-port-dev
mailing list