3 ms·
Great! I don't feel like many people are really thinking about this problem. Just a note, I believe system.gc() is a no op, has been for a while?
by marktangotango 10y ago
Great! I don't feel like many people are really thinking about this problem. Just a note, I believe system.gc() is a no op, has been for a while?
- sandius 10y agoI haven't seen that much written about this either. My only explanation is that it isn't generally seen as a problem worth solving, for two definition of "worth": either it's too difficult or even impossible; a solution to it isn't needed. I tend to disagree with both. Btw, thanks for the discussion! About System.gc(): at least in the Oracle JVM, I think so. But then look at what it says in the JavaDoc: "When control returns from the method call, the Java Virtual Machine has made a best effort to reclaim space from all discarded objects." A no-op interpretation can indeed be a best effort (as in, "there's nothing to be done!") :) But since it's the only place in the JDK that gives at least some kind of a GC-related guarantee, it's the best there is. These pastures may be greener in other JVMs, though!