Re: Haunting free(): invalid pointer 0x8a11604!

2005-02-11 Thread Rami Saarinen
--- Nick Liebmann <[EMAIL PROTECTED]> wrote: > > Ok, your problem is that the TCPSession::final calls delete this when > the thread ends. > > Your choices are > > 1) Dont call tcp->detach(), call start()... the thread will be deleted > automaticall by TCPSession::final > 2) override virtual

Re: [Fwd: Re: Haunting free(): invalid pointer 0x8a11604!]

2005-02-11 Thread Nick
Apologies, I am using an older version of common c++ David Sugar wrote: In older versions of the library you would use "delete this" for detached threads. In the current (1.3) releases, you should NEVER do this. That final() was appearently leftover from before detach behavior was changed. In

Re: [Fwd: Re: Haunting free(): invalid pointer 0x8a11604!]

2005-02-11 Thread David Sugar
In older versions of the library you would use "delete this" for detached threads. In the current (1.3) releases, you should NEVER do this. That final() was appearently leftover from before detach behavior was changed. In 1.?2? and definately 1.3, detach deletes the the thread the object for

[Fwd: Re: Haunting free(): invalid pointer 0x8a11604!]

2005-02-11 Thread Nick
Ok, your problem is that the TCPSession::final calls delete this when the thread ends. Your choices are 1) Dont call tcp->detach(), call start()... the thread will be deleted automaticall by TCPSession::final 2) override virtual void final() in TCPSessionThread, to do nothing. For the library, TCPS

Re: Haunting free(): invalid pointer 0x8a11604!

2005-02-11 Thread Rami Saarinen
--- Nick Liebmann <[EMAIL PROTECTED]> wrote: > I would also suggest declaring empty virtual destructors for any > inherited classes for which you have no specific > need for a destructor. I dont really know why this should be necessary, > but for some reason (at least in the past) > I have found