Boost logo

Boost Users :

From: Brian (bneal_at_[hidden])
Date: 2002-09-21 13:54:00


--- In Boost-Users_at_y..., "Peter Dimov" <pdimov_at_m...> wrote:
> From: "Nicola Musatti" <yg-boost-users_at_g...>
> > Peter,
> > the Borland 5.5.1 compiler behaves differently according to
whether you
> > enable the generation of debugging information or not. To further
> > confuse the issue, the command line compiler has debug information
> > generation turned off by default, while BCB5 has it on.
> >
> > The problem with shared_ptr only happens with debugging
information
> > turned on.
> > The 1.28.0 version of shared_ptr is handled correctly by the 5.6.1
> > compiler (the one in BCB6 with Update 2 installed).
>
> Once again, can someone please post an example that demonstrates the
> problem? I did use the -v switch with my example, and it worked.

Here is a summary of my experiences. I used the following:

1) boost 1.27.0
2) Borland C++ Builder command line compiler bcc32 version 5.5
3) Debug was turned on

With these 3, I was able to successfully implement a handle-body
idiom type class. I.e. the destructor for my private body
implementation WAS called when the handle class was destroyed.

If instead I use auto_ptr, the destructor is NOT called.
If instead I use scoped_ptr, it will not compile due to a bug in
Borland.

Earlier, I reported that shared_ptr didn't work but I can't reproduce
that now. Sorry for the confusion.

BN


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