• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: filling NSImage with binary data from NSData
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: filling NSImage with binary data from NSData


  • Subject: Re: filling NSImage with binary data from NSData
  • From: Uli Kusterer <email@hidden>
  • Date: Sun, 7 May 2006 23:53:18 +0200

Am 07.05.2006 um 21:37 schrieb marc joanisse:
vmrData = [NSData dataWithContentsOfFile:fileName];

I may be misremembering here, but aren't you supposed to retain the data you pass to initWithBitmapDataPlanes: ? What happens right now is that you're passing a pointer to a part of vmrData to your NSBitmapImageRep and then autorelease the NSData. Which means as soon as the pool is collected, your imagerep accesses stale memory because NSBitmapImageRep doesn't copy the data you give it.


Cheers,
-- M. Uli Kusterer
http://www.zathras.de


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >filling NSImage with binary data from NSData (From: "marc joanisse" <email@hidden>)

  • Prev by Date: Re: object type testing
  • Next by Date: Re: filling NSImage with binary data from NSData
  • Previous by thread: Re: filling NSImage with binary data from NSData
  • Next by thread: Re: filling NSImage with binary data from NSData
  • Index(es):
    • Date
    • Thread