cmState: Avoid accumulating snapshot storage for short-lived scopes

We need to keep only certain snapshot types and their ancestors.
Also keep those needed for backtraces.
This commit is contained in:
Brad King
2015-11-24 15:00:47 -05:00
parent f21dc4a81c
commit 5f860ebb67
3 changed files with 34 additions and 0 deletions
+4
View File
@@ -403,6 +403,10 @@ cmListFileBacktrace::cmListFileBacktrace(cmState::Snapshot snapshot,
: Context(cc)
, Snapshot(snapshot)
{
if (this->Snapshot.IsValid())
{
this->Snapshot.Keep();
}
}
cmListFileBacktrace::~cmListFileBacktrace()