[muscle] Re: Fwd: Updating from 3.30 to 5.22

  • From: Raymond Dahlberg <rd@xxxxxxxxxxx>
  • To: muscle@xxxxxxxxxxxxx
  • Date: Wed, 7 Apr 2010 21:11:09 +0100

Hi Jeremy,

Thanks a lot for your reply!

The m_CssPtr are deleted in the destructor of SNbSetupSystem, like this:

    SNbSetupSystem::~SNbSetupSystem( )
    {
        delete m_CssPtr;
        m_CssPtr = 0;
        CloseHandle( _serverExitedSignalHandle );
    }

And this destructor is called at the application exit when it goes out of
scope in main(). Stepping through with a debugger, this destructor seem to
be run before I get the assertion error.

I will try tomorrow to investigate more the leads in your first mail.

Regards,
Raymond

On Wed, Apr 7, 2010 at 4:00 PM, Jeremy Friesner <jeremyf@xxxxxxxxxxxxxx>wrote:

>
>
>
>
> Begin forwarded message:
>
> *From:* "Jeremy Friesner" <jeremyf@xxxxxxxxxxxxxx>
> *Date:* April 7, 2010 7:47:30 AM PDT
>
> *To:* <muscle@xxxxxxxxxxxxx>
> *Subject:* *Re: [muscle] Updating from 3.30 to 5.22*
>
> Btw, in the example below it looks like m_CssPtr is never deleted.  If that
> is the case, then that would cause the ObjectPool error you reported, since
> the CompleteSetupSystem destructor is responsible for invoking some cleanup
> routines, and it won't run if the object is never destroyed.
>
> Jeremy
>
> On Apr 7, 2010, at 4:30 AM, "Raymond Dahlberg" < <rd@xxxxxxxxxxx>
> rd@xxxxxxxxxxx> wrote:
>
> For example a little test server app where this is happening has this in
> main:
>
> int main( int argc, char** argv )
> {
>     // Initialize NetBorealis.
>     SNbSetupSystem ss;
>
>
> Where SNbSetupSystem is a singleton with this constructor:
>
>     SNbSetupSystem::SNbSetupSystem( )
>         : m_CssPtr( 0 ),
>         _serverExitedSignalHandle( 0 )
>     {
>         if ( m_CssPtr == 0 )
>         {
>             try {
>                 m_CssPtr = new CompleteSetupSystem( );
>             } catch ( bad_alloc& ) { fatalError( "FATAL ERROR: Out of
> memory (%s:%d).\n", __FILE__, __LINE__ ); }
>         }
>         _serverExitedSignalHandle = CreateEvent( 0, 0, 0, 0 );
>     }
>
> Any hints on this?
>
> Regards,
> Raymond
>
>
>  NOTICE: This email may contain confidential information. Please see
> http://www.meyersound.com/confidential/ for our complete policy.
>

Other related posts: