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.


"Peter Dimov" <[EMAIL PROTECTED]> wrote in message
000701c2a066$b1a8e720$1d00a8c0@pdimov2">news:000701c2a066$b1a8e720$1d00a8c0@pdimov2...
> From: "Johan Nilsson" <[EMAIL PROTECTED]>
> > "David Abrahams" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >
> > > Incidentally, shared_ptr<void> may allow you the kind of type erasure
> > > you want. Just a thought...
> >
> > I' afraid I don't really follow you. Wouldn't shared_ptr<void> choke on
> > trying to delete through a void pointer?
>
> No.
>
> shared_ptr<void> pv(new X);
> pv.reset(); // calls X::~X()
>
> _______________________________________________
> Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost
>




_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to