Skip to content

Commit

Permalink
Add Count property to DisposableCollection
Browse files Browse the repository at this point in the history
  • Loading branch information
Exanite committed Jan 14, 2025
1 parent 5da9b87 commit b510819
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Runtime/DisposableCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ public class DisposableCollection : IDisposable
// This is to avoid allocations while keeping things simple
private readonly Stack<object> stack = new();

public int Count => stack.Count;

/// <summary>
/// Adds a disposable object for disposal.
/// </summary>
Expand Down

0 comments on commit b510819

Please sign in to comment.