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

Re: Several questions


  • Subject: Re: Several questions
  • From: "John C. Randolph" <email@hidden>
  • Date: Mon, 2 Jul 2001 21:11:36 -0700

On Monday, July 2, 2001, at 06:26 PM, Hisaoki Nishida wrote:

I have some general questions about Cocoa programming.

1. retain and copy: what determines which I should use?

It depends. Retaining an object makes sure that it won't vanish. Copying an object makes sure that your copy doesn't change unless you change it.

2. What's the difference between - and + (in method declarations)?

- means an instance method. + means a class method.

3. What's the difference between @class and import? I can't distinguish their use.

@class simply advises the compiler that the given name is the name of a class. #import is like C's #include: it means that the compiler should go and read the given file.

4. When you autorelease something, it ceases to exist when the "event loop" is finished. What does this mean?

Have a look at Malcolm Crawford's article at stepwise.com,

http://www.stepwise.com/Articles/Technical/2001-03-11.01.html

-jcr

"This is not a book to be tossed aside lightly. Rather, it should be hurled with great force." -Dorothy Parker


References: 
 >Several questions (From: Hisaoki Nishida <email@hidden>)

  • Prev by Date: Re: AppKit source available as reference?
  • Next by Date: Re: Getting the user's name from cocoa
  • Previous by thread: Several questions
  • Next by thread: Re: Several questions
  • Index(es):
    • Date
    • Thread