Added vec2 support for multiple concurrent release to pool

This commit is contained in:
Max Cahill 2021-06-08 11:48:58 +10:00
parent b5d3707939
commit bcd94c134e

View File

@ -92,10 +92,13 @@ function vec2:pooled_copy()
end
--release a vector to the pool
function vec2:release()
function vec2:release(...)
if vec2.pool_size() < _vec2_pool_limit then
table.insert(_vec2_pool, self)
end
if ... then
vec2.release(...)
end
end
--unpack for multi-args