Do not add Impl._count to GC roots

This commit is contained in:
Denis Shelomovskij 2012-10-26 14:37:16 +04:00
parent c838ee3a5f
commit 5c63cc738e

View file

@ -2500,7 +2500,7 @@ if (!is(T == class))
_store = cast(Impl*) enforce(malloc(Impl.sizeof)); _store = cast(Impl*) enforce(malloc(Impl.sizeof));
if (hasIndirections!T) if (hasIndirections!T)
{ {
GC.addRange(&_store._payload, Impl.sizeof); GC.addRange(&_store._payload, T.sizeof);
} }
emplace(&_store._payload, args); emplace(&_store._payload, args);
_store._count = 1; _store._count = 1;