Date: Fri, 20 Feb 2009 19:17:55 -0800
From: Emil Dotchevski <emildotchevski@gmail.com>
Subject: Re: [Boost-users] boost::exception - leaking error_info

On Fri, Feb 20, 2009 at 3:00 PM, Bruce Laing
<bruce.laing@eng-software.com> 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