Proper way to 'unload' a loaded wasm module #1301
Answered
by
Robbepop
sampaioletti
asked this question in
Q&A
|
What would be the proper/optimum way to 'unload' or 'drop' a module with the intent to load a different module. e.g.
Since 'almost' everything keeps a hierarchy of references I'm unsure what would be most efficient i.e. freeing the right resources without unnecessary re-initialization. |
Answered by
Robbepop
Nov 7, 2024
Replies: 1 comment 2 replies
|
You can load multiple modules using the same Wasmi So if it is important to unload a Wasmi |
2 replies
Answer selected by
sampaioletti
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can load multiple modules using the same Wasmi
Engine. WasmiEnginemostly holds information about a module's function code. All other information is stored in theStore. You are right that it is currently not possible to "unload" a Wasm module from anEngine. This has technical reasons. If this use case is common enough we might be able to add this functionality.So if it is important to unload a Wasmi
Moduleyou'd need to dropModule,StoreandLinker.