[chromium-dev] Re: PSA: Virtual dispatch doesn't work (as you might expect) in destructors!

2009-10-31 Thread Erik Kay
On Fri, Oct 30, 2009 at 5:09 PM, David Levin le...@chromium.org wrote: On Fri, Oct 30, 2009 at 3:59 PM, Antoine Labour pi...@google.com wrote: On Fri, Oct 30, 2009 at 3:54 PM, Jeremy Orlow jor...@chromium.org wrote: On Fri, Oct 30, 2009 at 3:46 PM, Scott Hess sh...@chromium.org wrote:

[chromium-dev] Re: PSA: Virtual dispatch doesn't work (as you might expect) in destructors!

2009-10-30 Thread Adam Barth
I'm sorry for introducing this pattern in base::Thread. It's bitten use several times over the course of the project. If you see a better design, please don't hesitate to fix it. Adam On Fri, Oct 30, 2009 at 3:12 PM, Jeremy Orlow jor...@chromium.org wrote: I've spent a good deal of this

[chromium-dev] Re: PSA: Virtual dispatch doesn't work (as you might expect) in destructors!

2009-10-30 Thread Antoine Labour
On Fri, Oct 30, 2009 at 3:12 PM, Jeremy Orlow jor...@chromium.org wrote: I've spent a good deal of this week trying to track down what turned out to be a simple but fairly common problem: I forgot virtual dispatch only partially works in destructors. There have been several email threads

[chromium-dev] Re: PSA: Virtual dispatch doesn't work (as you might expect) in destructors!

2009-10-30 Thread Antoine Labour
On Fri, Oct 30, 2009 at 3:26 PM, Jeremy Orlow jor...@chromium.org wrote: On Fri, Oct 30, 2009 at 3:17 PM, Antoine Labour pi...@google.com wrote: On Fri, Oct 30, 2009 at 3:12 PM, Jeremy Orlow jor...@chromium.orgwrote: I've spent a good deal of this week trying to track down what turned out

[chromium-dev] Re: PSA: Virtual dispatch doesn't work (as you might expect) in destructors!

2009-10-30 Thread Scott Hess
Just to be clear for those of us who are wobbly on C++, this is because during the constructor or destructor, your object is of the class in question, NOT of the class it will finally be, because in the constructor the subclass has not been constructed, yet, and in the destructor the subclass was

[chromium-dev] Re: PSA: Virtual dispatch doesn't work (as you might expect) in destructors!

2009-10-30 Thread Jeremy Orlow
On Fri, Oct 30, 2009 at 3:46 PM, Scott Hess sh...@chromium.org wrote: Just to be clear for those of us who are wobbly on C++, this is because during the constructor or destructor, your object is of the class in question, NOT of the class it will finally be, because in the constructor the

[chromium-dev] Re: PSA: Virtual dispatch doesn't work (as you might expect) in destructors!

2009-10-30 Thread Michael Nordman
On Fri, Oct 30, 2009 at 3:46 PM, Scott Hess sh...@chromium.org wrote: Just to be clear for those of us who are wobbly on C++, this is because during the constructor or destructor, your object is of the class in question, NOT of the class it will finally be, because in the constructor the

[chromium-dev] Re: PSA: Virtual dispatch doesn't work (as you might expect) in destructors!

2009-10-30 Thread Scott Hess
On Fri, Oct 30, 2009 at 3:54 PM, Jeremy Orlow jor...@chromium.org wrote: On Fri, Oct 30, 2009 at 3:46 PM, Scott Hess sh...@chromium.org wrote: Just to be clear for those of us who are wobbly on C++, this is because during the constructor or destructor, your object is of the class in question,

[chromium-dev] Re: PSA: Virtual dispatch doesn't work (as you might expect) in destructors!

2009-10-30 Thread Antoine Labour
On Fri, Oct 30, 2009 at 3:54 PM, Jeremy Orlow jor...@chromium.org wrote: On Fri, Oct 30, 2009 at 3:46 PM, Scott Hess sh...@chromium.org wrote: Just to be clear for those of us who are wobbly on C++, this is because during the constructor or destructor, your object is of the class in

[chromium-dev] Re: PSA: Virtual dispatch doesn't work (as you might expect) in destructors!

2009-10-30 Thread David Levin
On Fri, Oct 30, 2009 at 3:59 PM, Antoine Labour pi...@google.com wrote: On Fri, Oct 30, 2009 at 3:54 PM, Jeremy Orlow jor...@chromium.org wrote: On Fri, Oct 30, 2009 at 3:46 PM, Scott Hess sh...@chromium.org wrote: Just to be clear for those of us who are wobbly on C++, this is because