Hacker News new | ask | show | jobs
by nradov 405 days ago
Does the JLS actually guarantee that if you free that byte array then the extra memory will be immediately available? I thought there could potentially be some lag. The safer approach would be to create all of the objects you need for a clean shutdown during program launch and keep them around. Then you won't need to allocate any memory in the exception handler.
1 comments

Your approach is safer for sure and doesn't require me the read the JLS before going to see my mother for mother's day, so it's doubly better !