Closed KurbanismailovZaur closed 1 month ago
Thanx!
I think this is a very simple and cool change.
Simple can be great too!
I do think that we need to notify users of this possibility in the Memory Pools docs before merging your PR. Maybe add an (Overriding Spawn Method with Parameter names?) section with an example on this .
Added virtual keyword to all
MonoMemoryPool.Spawn
methods with parameters. This allows you to redefine the names of the parameters of theSpawn
method, which is very convenient.Before change:
As you can see the parameter name is
param
. This is not very convenient, because there can be a lot of parameters and you don't remember everything.After change:
Override the
Spawn
method on the pool to specify parameter names.Now you can use the Spawn method with friendly parameter names.
I think this is a very simple and cool change.