add "dtor" for do destructor things in js layer