Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::exception - leaking error_info
From: Bruce Laing (bruce.laing_at_[hidden])
Date: 2009-02-23 12:31:17


>
>
> Date: Fri, 20 Feb 2009 19:17:55 -0800
> From: Emil Dotchevski <emildotchevski_at_[hidden]>
> Subject: Re: [Boost-users] boost::exception - leaking error_info

> On Fri, Feb 20, 2009 at 3:00 PM, Bruce Laing
> <bruce.laing_at_[hidden]> wrote:
> > This program seems to be leaking boost::exception::error_info objects.
> > Is there something missing here?
> >
> > - Bruce
> >
>

> What platform? Do you have a complete program that shows the problem?
>
> This test seems to work as expected:
>
> #include "boost/exception.hpp"
>
> class
> counter
>
....
> int
> main()
> {
> c=0;
> try
> {
> throw_func();
> }
> catch( an_exception & )
> {
> assert(c>0);
> }
> assert(!c);
> }
>
> Emil Dotchevski
> Reverge Studios, Inc.
> http://www.revergestudios.com/reblog/index.php?n=ReCode
>

Emil,

The platform is vc++ 8, boost 1.37.

Since submitting my inquiry to the list, I cut my boost.exception code out
into a separate test program that is very similar to the test code you gave
in your reply (thanks for that) , but my test program does not leak, so the
problem seems to involve some aspect of context from the original
surrounding code that I'm not yet able to identify. I'll write back with an
update if I can isolate the interaction that triggers the leakage.

- Bruce



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