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

Re: Cocoa and dead-code stripping


  • Subject: Re: Cocoa and dead-code stripping
  • From: Dirk Stegemann <email@hidden>
  • Date: Tue, 3 Jul 2007 18:46:52 +0300

Hello,

Am 03.07.2007 um 18:32 schrieb Andre Schnoor:

No stripper is able to tell which (theoretically) reachable code will actually be reached during runtime.

Exactly, so I think we can agree that every code which *might* be called at runtime has to stay in the binary.


Wade Tregaskis gave a pretty perfekt example for a method call not predictable by the linker/stripper:

.h
IBOutlet id myTextField;

.m
NSString *selectorName = [myTextField stringValue];
SEL newSelector = NSSelectorFromString(selectorName);
[myObject performSelector:newSelector];

That's a method name made up by the user of the program, at runtime; he will get "selector not found" runtime errors for any method that was stripped by the linker... and for any typos as well, of course ;-)


Best,
Dirk


_______________________________________________

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: 
 >Cocoa and dead-code stripping (From: Steve Christensen <email@hidden>)
 >Re: Cocoa and dead-code stripping (From: Chris Suter <email@hidden>)
 >Re: Cocoa and dead-code stripping (From: Steve Christensen <email@hidden>)
 >Re: Cocoa and dead-code stripping (From: Uli Kusterer <email@hidden>)
 >Re: Cocoa and dead-code stripping (From: Steve Christensen <email@hidden>)
 >Re: Cocoa and dead-code stripping (From: Chris Hanson <email@hidden>)
 >Re: Cocoa and dead-code stripping (From: Andrew Demkin <email@hidden>)
 >Re: Cocoa and dead-code stripping (From: Thomas Engelmeier <email@hidden>)
 >Re: Cocoa and dead-code stripping (From: Andre Schnoor <email@hidden>)
 >Re: Cocoa and dead-code stripping (From: "Dirk Stegemann (Mailing-Lists)" <email@hidden>)
 >Re: Cocoa and dead-code stripping (From: Andre Schnoor <email@hidden>)

  • Prev by Date: Re: Cocoa and dead-code stripping
  • Next by Date: Re: [MODERATOR - NDA] Re: Looking for NSCollectionView sample code
  • Previous by thread: Re: Cocoa and dead-code stripping
  • Next by thread: Re: Cocoa and dead-code stripping
  • Index(es):
    • Date
    • Thread