SourceExprCommand: allocate the vSourceExpr via uncollectable memory
Previously the memory would occasionally be collected during eval since the GC doesn't consider the member variable as alive / doesn't scan the region of memory where the pointer lives. By using the traceable_allocator<T> allocator provided by Boehm GC we can ensure the memory isn't collected. It should be properly freed when SourceExprCommand goes out of scope.
This commit is contained in:
+1
-1
@@ -41,7 +41,7 @@ private:
|
||||
|
||||
std::shared_ptr<EvalState> evalState;
|
||||
|
||||
Value * vSourceExpr = 0;
|
||||
std::shared_ptr<Value> vSourceExpr;
|
||||
};
|
||||
|
||||
enum RealiseMode { Build, NoBuild, DryRun };
|
||||
|
||||
Reference in New Issue
Block a user