vbscript: Move detach_global_objects call to VBScript destructor.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2019-11-07 19:30:28 +01:00 committed by Alexandre Julliard
parent d481efee39
commit fcc01c3095
1 changed files with 1 additions and 1 deletions

View File

@ -188,7 +188,6 @@ static void release_script(script_ctx_t *ctx)
IDispatchEx_Release(&script_obj->IDispatchEx_iface);
}
detach_global_objects(ctx);
heap_pool_free(&ctx->heap);
heap_pool_init(&ctx->heap);
}
@ -395,6 +394,7 @@ static ULONG WINAPI VBScript_Release(IActiveScript *iface)
if(!ref) {
decrease_state(This, SCRIPTSTATE_CLOSED);
detach_global_objects(This->ctx);
heap_free(This->ctx);
heap_free(This);
}