mirror of
https://github.com/fluencelabs/wasmer
synced 2025-03-16 16:20:49 +00:00
Fix import object destroy
This commit is contained in:
parent
7ef472dae2
commit
a502da58e3
@ -316,7 +316,7 @@ pub unsafe extern "C" fn wasmer_instantiate(
|
||||
}
|
||||
};
|
||||
unsafe { *instance = Box::into_raw(Box::new(new_instance)) as *mut wasmer_instance_t };
|
||||
// Box::into_raw(import_object); // TODO Review is this the correct way not to drop
|
||||
Box::into_raw(import_object);
|
||||
wasmer_compile_result_t::WASMER_COMPILE_OK
|
||||
}
|
||||
|
||||
|
@ -47,6 +47,6 @@ int main()
|
||||
printf("Destroy instance\n");
|
||||
wasmer_instance_destroy(instance);
|
||||
printf("Destroy import object\n");
|
||||
//wasmer_import_object_destroy(import_object); // TODO update instantiate and try this again
|
||||
wasmer_import_object_destroy(import_object);
|
||||
return 0;
|
||||
}
|
@ -41,6 +41,6 @@ int main()
|
||||
printf("Destroy instance\n");
|
||||
wasmer_instance_destroy(instance);
|
||||
printf("Destroy import object\n");
|
||||
//wasmer_import_object_destroy(import_object); // TODO update instantiate and try this again
|
||||
wasmer_import_object_destroy(import_object);
|
||||
return 0;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user