Thanks Andreas, I am indeed using ARC, so the code should be safe enough, as ARC will retain rec for me.
Cheers for taking a look though Tom Davie if (*ra4 != 0xffc78948) { return false; } On 22 Jan 2012, at 13:35, Andreas Grosam wrote: > > On Jan 22, 2012, at 2:15 PM, Thomas Davie wrote: >> OSPConnection *rec = [[self connectionQueue] objectAtIndex:0]; >> [[self connectionQueue] removeObjectAtIndex:0]; >> [[self currentConnections] addObject:rec]; > > > Not sure if this is related to your issue, but basically, the lines above are > potentially dangerous. You should mention which memory management model you > are using: GC, ARC or manual. > > > Writing it the way below should be safe in all cases and doesn't hurt at all > otherwise: > > OSPConnection *rec = [[self connectionQueue] objectAtIndex:0]; > [[self currentConnections] addObject:rec]; > [[self connectionQueue] removeObjectAtIndex:0]; > > > > Andreas > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/cocoa-dev/tom.davie%40gmail.com > > This email sent to tom.da...@gmail.com _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com