Index: src/zone.h |
=================================================================== |
--- src/zone.h (revision 1949) |
+++ src/zone.h (working copy) |
@@ -180,15 +180,10 @@ |
nesting_++; |
} |
- virtual ~ZoneScope() { |
- if (ShouldDeleteOnExit()) Zone::DeleteAll(); |
- --nesting_; |
+ ~ZoneScope() { |
+ if (--nesting_ == 0 && mode_ == DELETE_ON_EXIT) Zone::DeleteAll(); |
} |
- bool ShouldDeleteOnExit() { |
- return nesting_ == 1 && mode_ == DELETE_ON_EXIT; |
- } |
- |
// For ZoneScopes that do not delete on exit by default, call this |
// method to request deletion on exit. |
void DeleteOnExit() { |