• 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
Cocoa and dead-code stripping
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cocoa and dead-code stripping


  • Subject: Cocoa and dead-code stripping
  • From: Steve Christensen <email@hidden>
  • Date: Sun, 1 Jul 2007 19:05:43 -0700

Since I have a large number of targets that share a bunch of common code, I currently build a static library with the common bits and then link that against all of the other targets. This works pretty well for C++/Carbon.

I'm starting to incorporate Cocoa pieces into the shared library and was wondering if I'll start running into code bloat if I create full- featured classes but, for example, only end up using a couple of methods in a particular target. Does the linker correctly determine which methods are actually used and just including them (and methods they call, etc.)? Or am I going to find that all class methods are included because the linker can't tell which methods might be called?

Basically this is a question about best practices in terms of developing common, reusable code. I don't want to end up with a 1MB executable, when really only 100K of the code would ever be used. :-)

steve

_______________________________________________

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


  • Follow-Ups:
    • Re: Cocoa and dead-code stripping
      • From: Scott Ribe <email@hidden>
    • Re: Cocoa and dead-code stripping
      • From: Chris Suter <email@hidden>
  • Prev by Date: Re: Argument not getting passed to method
  • Next by Date: Re: Cocoa and dead-code stripping
  • Previous by thread: Re: Objective-C formatting guidelines
  • Next by thread: Re: Cocoa and dead-code stripping
  • Index(es):
    • Date
    • Thread