Boost logo

Boost Users :

Subject: Re: [Boost-users] scoped_ptr::release (again)
From: Alexander (gutenev_at_[hidden])
Date: 2009-02-23 15:35:36


> WFM...
>
> void foo(scoped_array<int> &b) {
> scoped_array<int> a(new int[5]);
> swap(a,b); // escape
> }

Hm.. I agree with you that having swap to escape scoping but not having
release looks inconsequent. In my opinion there should be no swap either.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net