I did some testing on Windows and as you said, the behavior on Windows seems to be normal. On OSX, I tried to put pressure on the memory, but it did not affect the numbers. It is however possible to far exceed the available memory. Also, I tried the following:
- Adding 100 Executors - resulted in java.lang.OutOfMemoryError: Direct buffer memory
- Starting two application, adding 50 Executors in each - No errors
- Looping the following a 100 times in 1 application: Adding 50 Executors, followed by clearing all Executors - this did not result in any errors
When the memory increases, a large part of the memory is however indicated as compressed.
I also had a look at the the active contexts using the OpenGL Profiler on OSX. A strange thing I noticed is in the Context Id comboboxes, the destroyed contexts stay green until glfwTerminate is called. Also, when attaching the profiler after contexts were created and destroyed, they are still shown. It is difficult to find information about the way this list is created, or the meaning of the colors, so it is hard to say if this really means something...
Anyway, thank you for the feedback so far!