The fact that the GC looks after everything is what concerns me
. Swapping lots of stuff in and out of memory is sure to cause more gc-induced pauses than I would like. Nothing is ever proven until implemented and tested, of course. Which is why I'm hoping someone around here has already been-there-done-that.
As for Bytebuffers, I don't see how that would be different. There is still no way to implicitly free the memory. The direct memory would still be allocated until the ByteBuffer is itself gc'ed, correct?
Unless (after rereading) you are suggesting that I use a ByteBuffer to hold all of the resource data. That's something I had not considered. But my first thoughts are that it would be way more trouble than it's worth.