|
|
|
|
|
by cogman10
83 days ago
|
|
Bad idea. I've made a pool allocator before, but that was for expensive network objects and expensive objects dealing with JNI. Doing it to avoid memory pressure generally means you simply have a bad algorithm that needs to be tweaked. It's very rarely the right solution. |
|
The JVM may optimize many short lived objects better than a pool of objects with less reasonably lifetimes.