List:MySQL++« Previous MessageNext Message »
From:Jonathan Wakely Date:June 14 2009 12:58pm
Subject:Re: Why dynamic allocation for Option objects?
View as plain text  
2009/6/14 Kevin Regan:
> The change below seems to fix this.  I believe that the type_info object
> returned is a singleton that outlives the object, but I'm not 100% sure of that.  Can
> some C++ expert confirm this?

It's not a singleton - you can have any number of instances of the
type, with different values.  Otherwise every use of the typeid
operator would return the same result!

But the lifetime of the type_info object will last until the end of
the program, so your change is safe in that respect.
Thread
Why dynamic allocation for Option objects?Kevin Regan6 Jun
  • Re: Why dynamic allocation for Option objects?Warren Young6 Jun
    • RE: Why dynamic allocation for Option objects?Kevin Regan11 Jun
      • Re: Why dynamic allocation for Option objects?Jonathan Wakely11 Jun
        • RE: Why dynamic allocation for Option objects?Kevin Regan13 Jun
          • RE: Why dynamic allocation for Option objects?Kevin Regan13 Jun
          • Re: Why dynamic allocation for Option objects?Jonathan Wakely13 Jun
            • RE: Why dynamic allocation for Option objects?Kevin Regan14 Jun
              • Re: Why dynamic allocation for Option objects?Jonathan Wakely14 Jun
                • RE: Why dynamic allocation for Option objects?Kevin Regan14 Jun
                  • Re: Why dynamic allocation for Option objects?Jonathan Wakely15 Jun
                    • RE: Why dynamic allocation for Option objects?Kevin Regan15 Jun
                      • Re: Why dynamic allocation for Option objects?Jonathan Wakely15 Jun
              • Re: Why dynamic allocation for Option objects?Warren Young16 Jun
        • Re: Why dynamic allocation for Option objects?Warren Young16 Jun