mirror of
https://github.com/mbierlee/poodinis.git
synced 2024-11-15 04:04:01 +01:00
Remove workaround
This commit is contained in:
parent
898dfd8943
commit
10d24eb9fb
|
@ -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,9 +118,7 @@ synchronized class DependencyContainer {
|
||||||
private ResolveOption persistentResolveOptions;
|
private ResolveOption persistentResolveOptions;
|
||||||
|
|
||||||
~this() {
|
~this() {
|
||||||
if (!((vendor == Vendor.digitalMars || vendor == Vendor.gnu) && __VERSION__ == 2066)) {
|
clearAllRegistrations();
|
||||||
clearAllRegistrations();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -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
|
assert(instance.preDestroyWasCalled == true);
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue