mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-01 20:00:51 -05:00
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:
@@ -403,6 +403,10 @@ cmListFileBacktrace::cmListFileBacktrace(cmState::Snapshot snapshot,
|
||||
: Context(cc)
|
||||
, Snapshot(snapshot)
|
||||
{
|
||||
if (this->Snapshot.IsValid())
|
||||
{
|
||||
this->Snapshot.Keep();
|
||||
}
|
||||
}
|
||||
|
||||
cmListFileBacktrace::~cmListFileBacktrace()
|
||||
|
||||
Reference in New Issue
Block a user