Re: Loading image
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