Skip to content

Instantly share code, notes, and snippets.

@jalcine
Created August 31, 2014 02:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jalcine/93bc496a6a0ac14bec18 to your computer and use it in GitHub Desktop.
Save jalcine/93bc496a6a0ac14bec18 to your computer and use it in GitHub Desktop.
Pain Point in Wintermute
// Snatched from http://git.io/P3hFYw
PluginPrivate::~PluginPrivate()
{
if (libraryPtr->isLoaded())
{
wwarn("Unloading plugin " + name + "'s library...");
if (libraryPtr->unload())
{
wwarn("Unloaded library for plugin " + name + "!");
libraryPtr = nullptr;
}
else
{
werror("Failed to unload library for " + name + ": " + libraryPtr->errorMessage());
}
} else {
winfo("No library loaded for this plugin; no need to unload anything.");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment