Browse Source
We no longer cache argument arrays in our EntityInstantiators to prevent changes to shared mutable state caused by reentrant calls. Previously, a re-entrant call requesting an argument array of the same size as a previous call in the call stack reused the same array instance. Changes to this shared mutable state by multiple invocations caused an invalid state rendering wrong parameters for object instantiation. Removing the caching and only reusing an empty array for zero-arg constructors is the only safe approach for now. Re-instantiation of object allocations results in a higher GC pressure but guarantee side effect-free instantiation and should be on-par with previous versions performance profile. Original pull request: #247.pull/248/merge
4 changed files with 54 additions and 53 deletions
Loading…
Reference in new issue