We are about to switch to a new forum software. Until then we have removed the registration on this forum.
So the Java garbage collection and memory management works in the background . In post from 2016 from Henri , "PImage won't release memopry" KevinWorkman says the Java garbage collection and memory management works in the background so "Out of Memory" error should never happen. Wonder if it is fixed in later versions or what cause I get it in the following scenerio.
Using 2.2.1 and getting out of memory when i run sketch. basically it asks the user to grab an image. The image is then loaded with loadImage() After 1000's of draw loops , i get out of memory and sketch halts with error messages in console. Is the auto memory management in Java the same in this version or better in later versions of Processing? The program uses an event counter to allow only one iteration of each condition in the draw loop. Step 1 - wait for user to request image grab Step 2 - loadImage and display with image() Step 3- perform image processing Step 4- report numeric results ( count all pixels below threshold) Reset event counter to 1 I inserted a wait time of 1 second to auto initiate the loop and it runs for hours and finally gives out of memory So is the garbage collector not working in theis version or what?