Boost logo

Boost :

From: Beman Dawes (beman_at_[hidden])
Date: 2000-12-27 08:45:29

At 07:38 PM 12/19/2000 -0500, Joe Gottman wrote:

     I think the scoped_ptr class should have a release() function, similar
to the one in std::auto_ptr. This would help in cases like the following

int *foo() {
     scoped_ptr<int> the_pointer(new int());
      //Do stuff that might throw
     return the_pointer.release();

[I've corrected the typo in the example code that confused everyone. Let's
start the discussion again, realizing that what we are talking about is
scoped_ptr<>, not shared_ptr<>. --Beman]

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