Some of you probably know that some of core java APIs make explicit calls to System.gc(). I know two cases when this happens:
- NIO. I believe that is done to do some cleanup for direct ByteBuffers, when system runs out of "direct" memory.
- RMI. Here, the reason is not that clear for me...
So, questions are:
- Do know reason why System.gc() is required for RMI?
- Do you know any other situations when core APIs (or even some other popular libraries) can make a direct call to System.gc()?