Merge branch 'threadsafe_managedarraypool' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-threadsafe_managedarraypool
This commit is contained in:
@@ -287,10 +287,12 @@ namespace FlaxEngine
|
||||
/// </summary>
|
||||
private static class ManagedArrayPool
|
||||
{
|
||||
private static List<ValueTuple<bool, ManagedArray>> pool = new List<ValueTuple<bool, ManagedArray>>();
|
||||
[ThreadStatic] private static List<ValueTuple<bool, ManagedArray>> pool;
|
||||
|
||||
internal static ManagedArray Get()
|
||||
{
|
||||
if (pool == null)
|
||||
pool = new List<ValueTuple<bool, ManagedArray>>();
|
||||
for (int i = 0; i < pool.Count; i++)
|
||||
{
|
||||
if (!pool[i].Item1)
|
||||
|
||||
Reference in New Issue
Block a user