Remove workaround

This commit is contained in:
Mike Bierlee 2016-12-26 15:45:43 +01:00
parent 898dfd8943
commit 10d24eb9fb
2 changed files with 2 additions and 15 deletions

View file

@ -23,7 +23,6 @@ import std.string;
import std.algorithm;
import std.concurrency;
import std.traits;
import std.compiler;
debug {
import std.stdio;
@ -119,10 +118,8 @@ synchronized class DependencyContainer {
private ResolveOption persistentResolveOptions;
~this() {
if (!((vendor == Vendor.digitalMars || vendor == Vendor.gnu) && __VERSION__ == 2066)) {
clearAllRegistrations();
}
}
/**
* Register a dependency by concrete class type.

View file

@ -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);
}
}
}