Matlab, Rust.
for example by wrapping the loadlibrary and unloadlibrary call in ~libisloaded checks, and perhaps using a try-catch statement to ensure that the library is unloaded even if the call to the library fails. If you’re calling this frequently, you may want to load the library once at the beginning of