• 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
Static data member behaviour in release builds
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Static data member behaviour in release builds


  • Subject: Static data member behaviour in release builds
  • From: Steve Baxter <email@hidden>
  • Date: Tue, 16 Aug 2005 18:33:53 +0100

Hi,

I have a strange problem. I have a class that has a static data member. This class is implemented in a shared framework and is linked to by an application and several other plugins (implemented as bundles).

In debug mode everything works fine - the app and plugins all share the same static data member.

In release mode this fails to work properly - it looks like each app and plugin gets its *own* copy of the static data member. This then causes our application to fail (the static is actually a pointer to a singleton which is initialised by the app and accessed by the app and all the plugins).

The only differences I can see between the release and debug builds are:

- Optimisation on in release mode
- Release strips dead code
- In debug mode the plugins, app and framework are "side by side"
- In release mode the plugins, app and framework are assembled into the app's bundle


I am a bit stumped by this. So far I have not been able to debug a release build - if you click build and debug it builds the release app and then runs the debug version. Anyone got any ideas?

Cheers,

Steve

Stephen Baxter
Software Development Manager
Improvision
email@hidden
+44-2476-692229


_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Static data member behaviour in release builds
      • From: Jack Nutting <email@hidden>
  • Prev by Date: Re: XCode 2.1 WO Development - Anyone else interested in filing a lawsuit?
  • Next by Date: [Retry] Apple cctools ld Failure
  • Previous by thread: Re: XCode 2.1 WO Development - Anyone else interested in filing a lawsuit?
  • Next by thread: Re: Static data member behaviour in release builds
  • Index(es):
    • Date
    • Thread