0

Fixed potential memory leak

This commit is contained in:
Pepich 2017-05-05 10:08:44 +02:00
parent 55badbb875
commit 538560a8cd

View File

@ -37,7 +37,7 @@ import net.minecraft.server.v1_11_R1.MinecraftServer;
/** The module loader, mother of all modules. Responsible for loading and taking care of all modules.
*
* @author Pepich */
@Version(major = 3, minor = 2, revision = 2, compatible = 2)
@Version(major = 3, minor = 2, revision = 3, compatible = 2)
public final class ModuleLoader implements CoreModule
{
private static ModuleLoader instance;
@ -322,6 +322,13 @@ public final class ModuleLoader implements CoreModule
}
String[] commands = getAllHooks(module).toArray(new String[] {});
CommandManager.unregisterAll(commands);
try
{
loaders.get(module).close();
}
catch (IOException e)
{}
loaders.remove(module);
}
}