Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Mutable collection type static field members that are actually mutated, sure. Thread creation in a static initializer? Yeah, that’s going to be a leak- but what you said was:

> It’s safe to assume that if there’s any statics there’s a permgen leak.

private static final int INT_PHI = 0x9e3779b9; // this is a useful constant that can be inlined in JIT code output, and not a memory leak.



It might use the word static, but in my head it's just a const, obviously fixed integers don't leak. Why bother pointing this out?




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: