• 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: Adding Images to a Cocoa Application in XCode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding Images to a Cocoa Application in XCode


  • Subject: Re: Adding Images to a Cocoa Application in XCode
  • From: Michael Watson <email@hidden>
  • Date: Sun, 1 Jul 2007 15:25:24 -0400

This leaks. You need to release the image when you're done with it.

http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/ MemoryMgmt.html


-- m-s

On 01 Jul, 2007, at 15:05, David Arnold wrote:

NSString *file = @"/Users/darnold/tmp/cocoa/practice/ blue_flower.jpg";
NSImage *image = [[NSImage alloc] initWithContentsOfFile:file];

[image drawInRect: destRect
fromRect:NSZeroRect
operation:NSCompositeSourceOver
fraction:1.0];

}

_______________________________________________

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


References: 
 >Adding Images to a Cocoa Application in XCode (From: David Arnold <email@hidden>)

  • Prev by Date: Adding Images to a Cocoa Application in XCode
  • Next by Date: Re: Adding Images to a Cocoa Application in XCode
  • Previous by thread: Adding Images to a Cocoa Application in XCode
  • Next by thread: Re: Adding Images to a Cocoa Application in XCode
  • Index(es):
    • Date
    • Thread