Re: EXC_BAD_ACCESS on NSImageView::setImage
Re: EXC_BAD_ACCESS on NSImageView::setImage
- Subject: Re: EXC_BAD_ACCESS on NSImageView::setImage
- From: Dev <email@hidden>
- Date: Fri, 13 Mar 2009 17:23:05 -0700
On Wed, Mar 11, 2009 at 9:33 AM, Scott Ribe <email@hidden> wrote:
> Does your setImage method retain the image?
>
The object ExternalView is a NSImageView so the setImage is the one of
NSImageView.
The doc says nothing about it, but i added some debug log like this :
NSLog(@"BEFORE : %d", [NewDisplayImage retainCount]);
[CameraView setImage:NewDisplayImage];
NSLog(@"AFTER : %d", [NewDisplayImage retainCount]);
2009-03-13 17:17:35.105 xxx[2281:e503] BEFORE : 1
2009-03-13 17:17:35.106 xxx[2281:e503] AFTER : 3
So i guess the image have been retained 2 times ....
--
I.
_______________________________________________
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