@synchronized crashing with ARC
@synchronized crashing with ARC
- Subject: @synchronized crashing with ARC
- From: Antonio Nunes <email@hidden>
- Date: Thu, 31 May 2012 16:47:45 +0100
I have a function that looks essentially like this:
static void *kMyVLFContext = &kMyVLFContext;
Boolean myFunction(CFURLRef path)
{
CFDictionaryRef myDictionary = NULL;
@synchronized(kMyVLFContext) {
… work …
}
return myDictionary != NULL;
}
This function works fine with manual memory management. After compiling with ARC though, a crash occurs on line "@synchronized(kMyVLFContext) {". I wouldn't think this should be affected by ARC at all. Any hints as to what might be afoot here, or is it more likely something else, earlier on is causing a failure here (e.g. stomping kMyVLFContext)?
Removing the lock causes the function to return successfully, but may of course cause issues on occasions when the function is called from several threads at once.
-António
----------------------------------------------------
It isn't so important to do great things,
as to do what you do with great love.
----------------------------------------------------
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden