Skip to content

Commit 865c27a

Browse files
authored
Merge pull request #33 from erkerkiii/feature/add-args-to-poolable-reset
add args to poolable reset
2 parents 6f320f0 + 9932460 commit 865c27a

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

Gum.Pooling/IPoolable.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ public interface IPoolable
77
event Action OnReturnToPoolRequested;
88
event Action OnDestroyed;
99

10-
void Reset();
10+
void Reset(object[] args = null);
1111
void Erase();
1212
}
1313
}

Gum.Pooling/QueuePool.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public T Get(object[] args = null)
5353
? _objectPool.Dequeue()
5454
: Create(args);
5555

56-
poolable.Reset();
56+
poolable.Reset(args);
5757
return (T)poolable;
5858
}
5959

Gum.Pooling/StackPool.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public T Get(object[] args = null)
5858
? _objectPool.Pop()
5959
: Create(args);
6060

61-
poolable.Reset();
61+
poolable.Reset(args);
6262
return (T)poolable;
6363
}
6464

Gum.Pooling/WeakStackPool.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public T Get(object[] args = null)
5454
? _objectPool.Pop()
5555
: Create(args);
5656

57-
poolable.Reset();
57+
poolable.Reset(args);
5858
return (T)poolable;
5959
}
6060

Tests/PoolingTests/MockPoolable.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public MockPoolable()
1616
IsActive = true;
1717
}
1818

19-
public void Reset()
19+
public void Reset(object[] args = null)
2020
{
2121
IsActive = true;
2222
}

0 commit comments

Comments
 (0)