Boost logo

Boost :

From: E. Gladyshev (egladysh_at_[hidden])
Date: 2003-08-28 17:26:27


--- Gregory Colvin <gregory.colvin_at_[hidden]> wrote:
> > How will I even know it, the documentation is completely
> > ignorant on the memory issues.
>
> Perhaps because you work with the authors of the documentation to
> make it sure it says what needs saying?

Are the documentation authors monitoring this mailing list?

> And I have no objection myself to adding an allocator parameter
> to the shared_ptr constructor, or to making some other change that
> serves the purpose. So if you need a change, why not just do it,
> try it out, and submit a patch?

How about

template< typename T, typename Counter = int >
shared_ptr
{
   typedef Counter counter; //counter type should be public

   template <typename DataAlloc = std::allocator<T>, typename CounterAlloc=std::allocator<counter>
>
   shared_ptr( const DataAlloc& da = DataAlloc(), const IntAlloc ia& = CountAlloc() );
};

>
> I also have no objection, and much sympathy, for having a clear
> memory management policy for Boost libraries. But again, it is a
> matter of people who care about and understand the issue doing the
> necessary work, just like everything else here at Boost.

I believe that the library authors should care about
memory management most.
If they don't understand something, they should ask people around,
but I am convinced that the boost authors are the best (honest).
I am sure that they can find a practical solution if they
only wanted to.

Actually this is probably what the whole thread is about
to get people to try to find the best practicle solution
for memory management in the modern C++ age.
I am not sure that STL style allocators is the best
possible solution.

Eugene

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk