Boost logo

Boost Users :

Subject: Re: [Boost-users] Object pools?
From: Ryan McConnehey (mccorywork_at_[hidden])
Date: 2010-02-17 20:54:48


Diederick C. Niehorster wrote:
> the object should be guaranteed to not be destroyed if only
> pool or outside holder is destroyed, but should be guaranteed to be
> destroyed when both are destroyed.
>
The only way I've currently found to have the object destroyed, if the
pool is already gone, is to have a static class registered with the
boost::shared_ptr. This gives the static class the ability to destroy
the object if the pool has unregistered itself. I don't like this as it
creates a bottleneck on deletes.

Ryan


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net