This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]