|
Boost : |
From: Eric Woodruff (Eric.Woodruff_at_[hidden])
Date: 2002-12-10 12:01:18
Using g++ 2.95.4,
#include <iostream>
#include <boost/shared_ptr>
struct Object {
~Object () {
std::cout << "byebye" << std::endl;
}
};
int main () {
Object o; // destructs
boost::shared_ptr<void> (new Object); // does not destruct, however
apprears to delete
std::cout << "done." << std::endl;
}
I didn't find any special documentation explaining special use of
boost::shared_ptr<void>.
"Peter Dimov" <pdimov_at_[hidden]> wrote in message
news:002b01c2a06b$2388ade0$1d00a8c0_at_pdimov2...
> From: "Eric Woodruff" <Eric.Woodruff_at_[hidden]>
> > I tested a shared_ptr<void> and while it seems to be invalidating the
> memory
> > of the pointer (implying that it is deleted), the proper destructor is
> never
> > called.
>
> Please post a test case that fails.
>
> _______________________________________________
> Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk