public static void CleanUp()
        {
            if (_yaraCompiledRulesDictionary.Any())
            {
                List <Rules> rules = _yaraCompiledRulesDictionary.Values.ToList();

                foreach (Rules r in rules)
                {
                    r.Dispose();
                }

                _yaraCompiledRulesDictionary.Clear();
                _yaraCompiledRulesDictionary = null;
            }

            if (_yaraContext != null)
            {
                _yaraContext.Dispose();
                _yaraContext = null;
            }
        }
Beispiel #2
0
 public void after_each()
 {
     ctx.Dispose();
 }