On Aug 17, 2009, at 5:47 PM, Maxwell, Adam R wrote:

> On 08/17/09 07:52, "Christiaan Hofman" <cmhof...@gmail.com> wrote:
>
>>
>> On Aug 17, 2009, at 4:40 PM, Adam R. Maxwell wrote:
>>
>>>
>>> On Aug 17, 2009, at 2:42 AM, Christiaan Hofman wrote:
>>>
>>>> I also tried replacing the bitmap code with the simple NSView API
>>>> cacheDisplayInRect:toBitmapImageRep:, but that even led to a crash.
>>>
>>> I also tried that with no success, for the frameview and the webview
>>> itself, but didn't see a crash.  Did you happen to use -
>>> [NSBitmapImageRep CGImage]?
>>
>> Yes. Is that buggy?
>
> Sort of; as soon as your NSBitmapImageRep is deallocated, that CGImage
> becomes invalid since they share the same pixel data.
>
> http://www.cocoabuilder.com/archive/message/cocoa/2008/2/21/199527
>
> This is a somewhat-understandable limitation for performance, but it  
> should
> have been documented.

That may be the crash I see. It may be understandable, but it's wrong.  
If the CGImage needs the imagerep it should implicitly retain it. This  
behavior is not in accordance with ownership rules, so even if it were  
documented it would be wrong.

Christiaan


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Bibdesk-develop mailing list
Bibdesk-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-develop

Reply via email to