JavaAPI: JSClassDefinition.dispose should have cleared callbacks