diff options
author | Brad King <brad.king@kitware.com> | 2015-11-24 20:00:47 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-11-25 17:30:13 (GMT) |
commit | 5f860ebb67e86e0aa407e26ddf79652f73742211 (patch) | |
tree | 3b70c951a78cb2c13c92ef6d66b996e1f38ae534 /Source/cmListFileCache.cxx | |
parent | f21dc4a81c05c79b873c9918f6fe8aff4bf02133 (diff) | |
download | CMake-5f860ebb67e86e0aa407e26ddf79652f73742211.zip CMake-5f860ebb67e86e0aa407e26ddf79652f73742211.tar.gz CMake-5f860ebb67e86e0aa407e26ddf79652f73742211.tar.bz2 |
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.
Diffstat (limited to 'Source/cmListFileCache.cxx')
-rw-r--r-- | Source/cmListFileCache.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx index 676074f..1465f90 100644 --- a/Source/cmListFileCache.cxx +++ b/Source/cmListFileCache.cxx @@ -403,6 +403,10 @@ cmListFileBacktrace::cmListFileBacktrace(cmState::Snapshot snapshot, : Context(cc) , Snapshot(snapshot) { + if (this->Snapshot.IsValid()) + { + this->Snapshot.Keep(); + } } cmListFileBacktrace::~cmListFileBacktrace() |