ClearListAtExit.cs 265 B

12345678910
  1. using System;
  2. using System.Collections.Generic;
  3. namespace SoftMasking {
  4. struct ClearListAtExit<T> : IDisposable {
  5. List<T> _list;
  6. public ClearListAtExit(List<T> list) { _list = list; }
  7. public void Dispose() { _list.Clear(); }
  8. }
  9. }