3 ms·
I don't understand the claim that replacing "polymorphism and dependency injection" with "static fields and service locators" reduces allocations. I would expe
by scott00 6y ago
I don't understand the claim that replacing "polymorphism and dependency injection" with "static fields and service locators" reduces allocations.
I would expect that getting rid of dependency injection would allow you to convert a virtual method call to a direct method call, and replace a constructor argument with a static field reference, but I don't see the connection to allocation.
Anybody understand this?