• 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: #import, #include, pre-compiled headers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: #import, #include, pre-compiled headers


  • Subject: Re: #import, #include, pre-compiled headers
  • From: "J. Todd Slack" <email@hidden>
  • Date: Thu, 28 Aug 2008 11:37:42 -0700


Hi Jon,

Thanks, the Headers and Performance section was helpful.

-Jason

On Aug 28, 2008, at 11:27 AM, Jonathan Hohle wrote:

#import and #include do not copy the contents of the other files into the file which contains them, rather it tells the compiler that it is referencing definitions from that file. It does not increase the size of your program to #import or #include a header file more than once across many files.

http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/Tasks/IncludingFrameworks.html
http://gcc.gnu.org/onlinedocs/cpp/Include-Operation.html#Include-Operation

Jon
<><

On Thu, Aug 28, 2008 at 11:18 AM, J. Todd Slack <email@hidden > wrote:
HI All,


Question on #import, #include and pre-compiled headers.

I have a bunch of classes that import the same #imports (like QTKit, Quicktime, Cocoa, Foundation, etc, etc)

Is there a way that I can just #import them once and not have to for each class?

Is that a pre-compiled header?

Wouldn't not importing them each class make my app smaller in size and use less memory?

Thanks,

-Jason


_______________________________________________

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



--
Jon
<><

_______________________________________________

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: 
 >#import, #include, pre-compiled headers (From: "J. Todd Slack" <email@hidden>)

  • Prev by Date: Re: File Extensions Problem
  • Next by Date: Convert unicode string into ascii
  • Previous by thread: #import, #include, pre-compiled headers
  • Next by thread: Convert unicode string into ascii
  • Index(es):
    • Date
    • Thread