I have some C++ code (written by someone else) which appears to be calling the wrong function. Here\'s the situation:
UTF8InputStreamFromBuffer* cstream = foo();
I had this issue and the problem for me was that I was storing it in a class member variable. When I changed it to a pointer and involved new/delete, it successfully registered the child class and its function.