Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2001-01-09 10:41:08

Oh, I've often wanted something like a weak_ptr, but the quoted link didn't
seem to refer to anything like that. I see it now.

Actually, what I've mostly wanted was a way to keep garbage-collectable data
in a kind of cache without preventing it from being collected. This is only
loosely related to weak_ptr.


----- Original Message -----
From: "William Kempf" <sirwillard_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Tuesday, January 09, 2001 9:50 AM
Subject: [boost] Re: uncounted_ptr

> --- In boost_at_[hidden], "David Abrahams" <abrahams_at_m...> wrote:
> > Not to my knowledge. Why would you want something like that?
> Doesn't a raw
> > pointer work just fine?
> The main difference is that raw pointers will lead to "dangling
> pointer" problems that won't occur with "weak smart pointers". I've
> never had to deal with this situation (I've avoided smart pointers in
> cases with circular references) so I can't tell you how bad the raw
> pointer approach is or how good the weak smart pointer approach is,
> but the reasoning was well presented in the posted article.
> Bill Kempf

Boost list run by bdawes at, gregod at, cpdaniel at, john at