Boost logo

Boost :

Subject: [boost] [valid_ptr] proposing a new type of pointer object that allows validity tracking without memory management and object ownership
From: Dan Walters (dan683_at_[hidden])
Date: 2011-03-16 08:57:37


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
required).

The valid_ptr library is to be optimized for access rather than fast
assignment / de-assignment.

Detailed proposal:
https://docs.google.com/document/pub?id=1wod4CbeL9x8rLJ2S8815akMAGmYj-fCq90T_2jFlxtw

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,

Dan


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