> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Chris
> January
> Sent: Tuesday, January 14, 2003 6:01 PM
> To: Boris Schaeling
> Cc: [EMAIL PROTECTED]
> Subject: RE: Bug in g++: Testcase exits with segmentation fault

> [...]
> The bug is actually in your testcase.
> The line:
>       Observers.push_back(observer());
> creates a temporary observer object. So when the line
>       observer::observer() { Select.give(this); }
> calls give(), it leaves a dangling pointer.

Oh, you are right. I've forgotten to use a smart pointer ... thanks for your
feedback!

Boris


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply via email to