Skip to content

Commit

Permalink
Changed: Don't Explicit Unbind on Get when unbound.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sewer56 committed Jul 30, 2022
1 parent 07e787d commit f7d9575
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions source/Reloaded.Mod.Launcher.Lib/IoC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,8 @@ public static T Get<T>()
if (!IsExplicitlyBound<T>())
{
// We need to do it this way because rebind might fail with existing binding.
var token = BindToTransient<T>();
var result = Container.Resolve<T>();
token.Dispose();
return result;
BindToTransient<T>();
return Container.Resolve<T>();
}

return Container.Resolve<T>();
Expand Down

0 comments on commit f7d9575

Please sign in to comment.