Mirror of Svelto.ECS because we're a fan of it
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
456B

  1. using System;
  2. namespace Svelto.ECS
  3. {
  4. [AllowMultiple]
  5. public class DisposeDisposablesEngine : IEngine, IDisposable
  6. {
  7. public DisposeDisposablesEngine(IDisposable[] disposable)
  8. {
  9. _disposable = disposable;
  10. }
  11. public void Dispose()
  12. {
  13. foreach (var d in _disposable)
  14. {
  15. d.Dispose();
  16. }
  17. }
  18. IDisposable[] _disposable;
  19. }
  20. }