Fix memory leak in MetaObject::invokeMethod