This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
pure virtual method called
- From: "Darbin Rowland-p56553" <Rowland dot Darbin at gdds dot com>
- To: <gcc-help at gcc dot gnu dot org>
- Date: Tue, 15 Feb 2005 18:29:19 -0500
- Subject: pure virtual method called
I am getting a "pure virtual method called" error followed by a nicely printed "Abort" in my application. I have looked and seen this as a problem for static casted objects but mine aren't. Has anyone else seen this behavior before.
To repeat this error all I have to do is leave the interference method which internally calls "delete this" when the reference count is 0 (which it is, nobody else knows about it any more). The method causes this error on the return not on the "delete this" but commenting out the delete line prevents the problem from occurring. I wrote a test application which does a similar thing but it doesn't produce the problem, so I am at a loss. Any insight would be greatly appreciated.
Incidentally this code is in a shared library, and also it compiles and runs as expected on windows when built with VC6.0.
- Rowland