$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] [smart_ptr] weak_ptr pointer semantics
From: Szymon Gatner (szymon.gatner_at_[hidden])
Date: 2011-11-12 04:47:11
>
> No, it isn't.
>
> if( shared_ptr<> p = weak.lock() )
> {
> p->thisWillNotAssert();
> }
>
> expired() should only be used for positive tests: if( weak.expired() ). Once
> a weak_ptr expires, it stays expired, so there is no potential for a race.
So that is a "no" on a get() thing? ;)
Regards,
Simon