refactor IScriptApiObject reset method to dispose, extends IDisposable