The problem is I use the hot reload in my project, and after the reloading of the project I re-create all instances of that I use, such as LiteDB, etc
simple Repro:
// On hot-reload load
protected override void Load()
{
_liteDatabase = new LiteDatabaseAsync(databaseFilePath);
}
// On hot-reload unload
protected override void Unload()
{
Instance = null;
_liteDatabase?.Dispose();
}
// and at some runtime method if I'll try to use the _liteDatabase after the "reload" - I will get an exception about dispose
Expected behavior allows me to use the lite database when the new instance is created even if the previous instance was disposed
The problem is I use the hot reload in my project, and after the reloading of the project I re-create all instances of that I use, such as LiteDB, etc
simple Repro:
Expected behavior allows me to use the lite database when the new instance is created even if the previous instance was disposed