• 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 function var not destroyed in Dynamic Library unload
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

static function var not destroyed in Dynamic Library unload


  • Subject: static function var not destroyed in Dynamic Library unload
  • From: Olivier Tristan <email@hidden>
  • Date: Fri, 18 Mar 2005 15:17:21 +0100

Hi,

It seems that static variable of functions are not destroyed
when a Dynamic Library is unloaded.
Only static var of files are.

Example:

Foo &GetFooInstance()
{
   static Foo foo;
   return foo
}

the Foo destructor is never called.

but if I do that:


static Foo foo;

Foo& GetFooInstance()
{
   return foo;
}

It works perfectly


Is that a known bug or am I the only one to have such problem ?



--
Olivier Tristan
Ultimate Sound Bank
_______________________________________________
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 function var not destroyed in Dynamic Library unload
      • From: David Fang <email@hidden>
  • Prev by Date: Re: Cocoa nib file corruption when using split views?
  • Next by Date: Include Path Problem
  • Previous by thread: Re: InfoPlist
  • Next by thread: Re: static function var not destroyed in Dynamic Library unload
  • Index(es):
    • Date
    • Thread