
--- Steven Watanabe wrote:
joel falcou wrote:
I'm jumping in the wagon but this very piece of code leads to a "incorrect free" on Snow Leopard using g++ 4.2.1 Apple. Maybe it is related to the virtual matter
We've already discussed this many times. The code above is wrong for reasons unrelated to the use of a virtual destructor, although adding a virtual destructor masks the problem. This has been fixed in the trunk.
Thanks Steven, with some searching I think I found the patch you are referring to: https://svn.boost.org/trac/boost/changeset/56467 Seeing this patch, I now see how the virtual function is a red herring (although I don't know why it happens to work, in this case). Nevertheless, I still like the idea of making it virtual, just to avoid the necessity of switching on type and casting to delete, but that's my opinion. Scott