Memory leaks with PImage: loadPixels() updatePixels() image() in OpenGL.
in
Core Library Questions
•
2 years ago
See this example. In both 1.2 and 1.5 of Processing they fill up my memory till the program throws an OutOfMemory exception.
- import processing.opengl.*;
- import javax.media.opengl.*;
- PImage img;
- void setup() {
- size(1024, 768, OPENGL);
- img = createImage(width, height, ARGB);
- }
- void draw() {
- img.loadPixels();
- // do nothing, or something.
- img.updatePixels();
- image(img, 0, 0); // and see the memory leak..
- }
1