diff --git a/source/poodinis/container.d b/source/poodinis/container.d index d29bd35..6eb4342 100644 --- a/source/poodinis/container.d +++ b/source/poodinis/container.d @@ -23,7 +23,6 @@ import std.string; import std.algorithm; import std.concurrency; import std.traits; -import std.compiler; debug { import std.stdio; @@ -119,9 +118,7 @@ synchronized class DependencyContainer { private ResolveOption persistentResolveOptions; ~this() { - if (!((vendor == Vendor.digitalMars || vendor == Vendor.gnu) && __VERSION__ == 2066)) { - clearAllRegistrations(); - } + clearAllRegistrations(); } /** diff --git a/test/poodinis/containertest.d b/test/poodinis/containertest.d index 217ba25..1d3cd3a 100644 --- a/test/poodinis/containertest.d +++ b/test/poodinis/containertest.d @@ -543,16 +543,6 @@ version(unittest) { auto instance = container.resolve!PreDestroyerOfFates; container.destroy(); - /* Due to a bug in D 2.066.1 a memory violation occurs when class destructors are - called under certain circumstances. Poodinis works around this issue and - sacrifices the ability to call pre-destructors when the container is destroyed - in D 2.066.1 - */ - import std.compiler; - if ((vendor == Vendor.digitalMars || vendor == Vendor.gnu) && __VERSION__ == 2066) { - assert(instance.preDestroyWasCalled == false); - } else { - assert(instance.preDestroyWasCalled == true); - } + assert(instance.preDestroyWasCalled == true); } }