2
0

Agent.cs 410 B

123456789101112131415161718192021
  1. using Jint.Native;
  2. namespace Jint;
  3. /// <summary>
  4. /// https://tc39.es/ecma262/#sec-agents , still a work in progress, mostly placeholder
  5. /// </summary>
  6. internal sealed class Agent
  7. {
  8. private readonly List<JsValue> _keptAlive = new();
  9. public void AddToKeptObjects(JsValue target)
  10. {
  11. _keptAlive.Add(target);
  12. }
  13. public void ClearKeptObjects()
  14. {
  15. _keptAlive.Clear();
  16. }
  17. }