Re: [NSImageView setImage:theImage] Thread safe??
Re: [NSImageView setImage:theImage] Thread safe??
- Subject: Re: [NSImageView setImage:theImage] Thread safe??
- From: Trygve Inda <email@hidden>
- Date: Wed, 01 Jul 2009 23:48:20 +0000
- Thread-topic: [NSImageView setImage:theImage] Thread safe??
> 2009/7/1 Trygve Inda <email@hidden>:
>> So is this legal in a secondary thread?
>>
>> NSImage* theImage = [[NSImage alloc] initWithContentsOfFile:someImagePath];
>> [imageView setImage:theImage];
>> [theImage release];
>
> No.
> I have no idea how this squares with "generally thread-safe", but when
> in doubt, assume it's not.
>
> Since -[NSImage setImage:] is nowhere documented to be thread safe
> that I can see, you must assume that it's not.
Thanks. I guess I drew too much into "generally thread-safe"... I guess
rocks generally float at 1 Infinite Loop, except when they don't. :-)
Trygve
_______________________________________________
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