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

View file

@ -543,16 +543,6 @@ version(unittest) {
auto instance = container.resolve!PreDestroyerOfFates; auto instance = container.resolve!PreDestroyerOfFates;
container.destroy(); 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);
} }
}
} }