New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

struct destructors are not being called #987

merged 1 commit into from Feb 23, 2015
Jump to file or symbol
Failed to load files and symbols.
+2 −1
Diff settings


Just for now

@@ -597,7 +597,8 @@ template FreeListObjectAlloc(T, bool USE_GC = true, bool INIT = true)
static if( INIT ){
scope(failure) assert(0, "You shouldn't throw in destructors");
auto objc = obj;
static if (is(TR == T*)) .destroy(*objc);//typeid(T).destroy(cast(void*)obj);
else .destroy(objc);
static if( hasIndirections!T ) GC.removeRange(cast(void*)obj);
manualAllocator().free((cast(void*)obj)[0 .. ElemSize]);
ProTip! Use n and p to navigate between commits in a pull request.