diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2019-12-31 19:09:49 -0300 |
|---|---|---|
| committer | Thog <thog@protonmail.com> | 2020-01-09 02:13:00 +0100 |
| commit | 59fdaa744b20f91928ee3fcaf5fabfcb7b409451 (patch) | |
| tree | f01e21d930e456398411317784c5063c532a7215 /Ryujinx.Graphics.Gpu/Memory/RangeList.cs | |
| parent | f7bcc884e46805f4dcda4fc7d7e7bccb2a3ac316 (diff) | |
GPU resource disposal
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Memory/RangeList.cs')
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Memory/RangeList.cs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Ryujinx.Graphics.Gpu/Memory/RangeList.cs b/Ryujinx.Graphics.Gpu/Memory/RangeList.cs index 1d185e21..75be1cf2 100644 --- a/Ryujinx.Graphics.Gpu/Memory/RangeList.cs +++ b/Ryujinx.Graphics.Gpu/Memory/RangeList.cs @@ -1,4 +1,5 @@ using System; +using System.Collections; using System.Collections.Generic; namespace Ryujinx.Graphics.Gpu.Memory @@ -7,11 +8,11 @@ namespace Ryujinx.Graphics.Gpu.Memory /// List of GPU resources with data on guest memory. /// </summary> /// <typeparam name="T">Type of the GPU resource</typeparam> - class RangeList<T> where T : IRange<T> + class RangeList<T> : IEnumerable<T> where T : IRange<T> { private const int ArrayGrowthSize = 32; - private List<T> _items; + private readonly List<T> _items; /// <summary> /// Creates a new GPU resources list. @@ -320,5 +321,15 @@ namespace Ryujinx.Graphics.Gpu.Memory return ~left; } + + public IEnumerator<T> GetEnumerator() + { + return _items.GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return _items.GetEnumerator(); + } } }
\ No newline at end of file |
