Free up memory from step level outputs in composite action (#641)

This commit is contained in:
Ethan Chiu
2020-08-10 14:31:30 -04:00
committed by GitHub
parent 562eafab3a
commit 976217d6ec
3 changed files with 216 additions and 183 deletions

View File

@@ -15,6 +15,14 @@ namespace GitHub.Runner.Worker
private static readonly Regex _propertyRegex = new Regex("^[a-zA-Z_][a-zA-Z0-9_]*$", RegexOptions.Compiled);
private readonly DictionaryContextData _contextData = new DictionaryContextData();
public void ClearScope(string scopeName)
{
if (_contextData.TryGetValue(scopeName, out _))
{
_contextData[scopeName] = new DictionaryContextData();
}
}
public DictionaryContextData GetScope(string scopeName)
{
if (scopeName == null)