Mercurial > projects > ldc
changeset 554:1b702422451c
Always call finalizer for stack classes. Checking for the number of
destructors of the class type is not sufficient: we may be holding a derived
class with a destructor.
Fixes: run/auto_07
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Thu, 28 Aug 2008 20:17:21 +0200 |
parents | d19e29194c13 |
children | c2d8fca91e09 |
files | gen/toir.cpp |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/gen/toir.cpp Thu Aug 28 20:15:36 2008 +0200 +++ b/gen/toir.cpp Thu Aug 28 20:17:21 2008 +0200 @@ -1520,8 +1520,7 @@ } else if (DVarValue* vv = dval->isVar()) { if (vv->var && vv->var->onstack) { - if (tc->sym->dtors.dim > 0) - DtoFinalizeClass(dval->getRVal()); + DtoFinalizeClass(dval->getRVal()); onstack = true; } }