Boost logo

Boost :

Subject: Re: [boost] Review of a safer memory management approach for C++?
From: Ingo Loehken (Ingo.Loehken_at_[hidden])
Date: 2010-05-28 11:35:21

How about resources shared across multiple instances, where the shared
resource is hold
by a static to a weak_ptr and each instance participating to that resource
holds it as a shared
ptr, to guarantee that there is no lifetime prolongation (same as approach
for std::cout and others).
Assumption for above statement : Construction of the resource is quite

Another limitation, is if you do not have the choice. Relying on other
frameworks, passing
around objects with embedded reference counts, to enable sharing across
language barriers,
such like done by XPCOM in Mozilla between JS and C++ via idl.

From: David Abrahams <dave_at_[hidden]>
To: boost_at_[hidden]
Date: 28.05.2010 16:11
Subject: Re: [boost] Review of a safer memory management approach
for C++?
Sent by: boost-bounces_at_[hidden]

[Please don't top post. Try outlook-quotefix or oe-quotefix:,

At Fri, 28 May 2010 15:32:22 +0200, Ingo Loehken wrote:
>> From: David Abrahams <dave_at_[hidden]>
>> Furthermore, your logic seems flawed to me. By analogy:
>> There is no need for Intel processors (we can all use AMD).
>> Therefore there is no use for an Intel processor?
> No, thats a twisted interpretation. I'm just pointing out, there is a
> for shared ownership.

I'm not sure I agree that there actually is a need. All the shared
ownership scenarios I can think of can be translated into
single-ownership-at-a-higher-level. That, however, is not always

Dave Abrahams           Meet me at BoostCon:
BoostPro Computing
Unsubscribe & other changes:

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