Subject: Re: [boost] [valid_ptr] proposing a new type of pointer object that allows validity tracking without memory management and object ownership
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2011-03-16 09:20:03
On 03/16/2011 01:57 PM, Dan Walters wrote:
> Dear all,
> I am posting to propose a new light weight pointer object library
> (boost.valid_ptr) that provides safe validity checking without having
> to take ownership or the the responsibility of memory management of
> the object pointed to.
> The intention is to develop a useful pointer object that is easy to
> use and handles validity in a simple and invisible manner, to be used
> just like a normal pointer and in a way that a programmer would be
> familiar with, to produce cleaner and more intuitive code than other
> pointer libraries for its problem domain.
> The library would be best used when it is difficult to determine when
> an object will be released, for example, when pointing to objects
> higher on the stack, objects that are members of other objects or
> objects contained within a boost.ptr_container.
> The library is to be practically useful and most useful where
> boost.smart_ptr and boost.ptr_container libraries are not appropriate
> (for example, due to memory management or ownership not being
> The valid_ptr library is to be optimized for access rather than fast
> assignment / de-assignment.
> Detailed proposal:
> I am posting here in the hope it will generate suitable interest that
> it may be worth developing as a full library for submission.
> Best wishes,
how and when is this better than what can be achieved by using
intrusive_ptr<T> and its associated function overloads?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk