pgraph: mark TransformState as invalid in destructor

This, in combination with ebef9f3de8, makes it easier to catch issues in code that is accidentally letting get temporary TransformState objects get destroyed.  It does not affect release builds.
This commit is contained in:
rdb 2018-12-19 20:47:57 +01:00
parent ebef9f3de8
commit daa3100bf1
1 changed files with 4 additions and 0 deletions

View File

@ -96,6 +96,10 @@ TransformState::
// true now, probably we've been double-deleted.
nassertv(get_ref_count() == 0);
_cache_stats.add_num_states(-1);
#ifndef NDEBUG
_flags = F_is_invalid | F_is_destructing;
#endif
}
/**