Boost logo

Boost Users :

Subject: Re: [Boost-users] serialization singleton assert on iphone
From: Robert Ramey (ramey_at_[hidden])
Date: 2009-04-13 12:53:54

It would be interesting to know the stack trace for this to know from where
the call is being made. This suggests that the order of destruction is
different than what the library expects. So other informaition
such as compiler version etc are also interesting.

Robert Ramey

"gtsml owevwr" <gtsml.owevwr_at_[hidden]> wrote in message

I have an assert when exiting my application using the serialization lib of
boost 1.38.

    BOOST_DLLEXPORT static T & get_instance() {
        static detail::singleton_wrapper<T> t;
        // refer to instance, causing it to be instantiated (and
        // initialized at startup on working compilers)
        assert(! detail::singleton_wrapper<T>::m_is_destroyed);
        return static_cast<T &>(t);

The same code doesn't assert on windows XP so I guess that's something messy
with static allocation on the iphone platform.
On the iphone, the load/save code works well as long as it's not called when
the application exit.

As far I as I understand, I need to move my exit code somewhere else, when
those singleton are still allocated.
Can somebody confirm that? Or maybe I'm missing something...

Any feedback warmly welcome!


Boost-users mailing list

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at