• 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: Loading image
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Loading image


  • Subject: Re: Loading image
  • From: Peter Ammon <email@hidden>
  • Date: Thu, 31 May 2001 10:07:20 -0700

on 5/30/01 6:51 AM, Youngjin Kim at email@hidden wrote:

> Both expression work fine. Is there difference between two?
>
> image = [[NSImage allocWithZone:[self zone]] initByReferencingFile:path];
> image = [[NSImage alloc] initWithContentsOfFile:path];
>
>
> Youngjin

There's only a difference if "self" is placed in a different zone than the
standard one, which would only happen if you explicitly requested it. From
the Apple docs that I've read, zones don't really provide any performance
benefit, so use the second expression.

-Peter


References: 
 >Loading image (From: Youngjin Kim <email@hidden>)

  • Prev by Date: Placing a PDF file form within a cocoa app
  • Next by Date: Re: StepWise/CodeFab ScreenSaver Contest Update
  • Previous by thread: Re: Loading image
  • Next by thread: Carbon Framework - DataBrowser Tweaks
  • Index(es):
    • Date
    • Thread