Remove an Arc holding module code from InstanceHandle (#2374)

We've generally moved to a model where `InstanceHandle` doesn't hold
ownership of its internals, instead relying on the caller to manage
that. This removes an allocation on the `Func::wrap` path but otherwise
shouldn't have much impact.
This commit is contained in:
Alex Crichton
2020-11-06 16:16:47 -06:00
committed by GitHub
parent 73cda83548
commit 12e658a1ef
4 changed files with 6 additions and 10 deletions

View File

@@ -246,7 +246,6 @@ impl CompiledModule {
) -> Result<InstanceHandle, InstantiationError> {
InstanceHandle::new(
self.module.clone(),
self.code.clone(),
&self.finished_functions.0,
imports,
mem_creator,