-
Enhancement
-
Resolution: Fixed
-
P4
-
17, 21, 22, 23
-
None
We have seen the cases in production where lots of empty CopyOnWriteArrayList-s take a considerable amount of memory/instances. We can follow the example how other collections handled these cases, and initialize with a shared empty array instance.
See e.g.JDK-8035584 for ArrayList: https://github.com/openjdk/jdk/commit/e0c3c7a07de23cca0ee938eb64af973d567fcdaf
See e.g.
- links to
-
Commit(master) openjdk/jdk/a5d948fb
-
Review(master) openjdk/jdk/19527