Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!apple!lsr From: lsr@Apple.COM (Larry Rosenstein) Newsgroups: comp.sys.mac.programmer Subject: Re: problem with global object construction Message-ID: <13238@goofy.Apple.COM> Date: 29 Apr 91 20:38:11 GMT References: <1991Apr23.223800.21774@searchtech.com> Organization: Apple Computer, Inc. Lines: 15 In article <1991Apr23.223800.21774@searchtech.com> davidr@searchtech.com (David Resnick) writes: >I'm using MPW 3.1, programming in C++. I seem to have discovered that >if I define a global object, the constructor for that object is >not actually called until a non-inline method is called on the object >from within a block. Here is my test program: I got a message back from the C++ engineers. There's a compiler flag -z5 which says to not strip unused static objects that have constructors or destructors. -- Larry Rosenstein, Apple Computer, Inc. lsr@apple.com (or AppleLink: Rosenstein1)