get(); memory leak?
in
Programming Questions
•
2 years ago
I've just begun messing around with get(), and it seems like it's adding every get() instance in the memory till it reaches the memory limit...is it possible?
in task manager I can see it growing in memory.. here's my code..
- PImage a;
- void setup(){
- size(500,500,P2D);
- a=loadImage("blast.jpg");
- imageMode(CENTER);
- }
- float x=0;
- void draw(){
- background(0x1d1d35);
- pushMatrix();
- translate(250,250);
- rotate(radians(x+=0.9f));
- image(a,0,0,500,500);
- tint(255,0,0);
- popMatrix();
- a=get();
- }
I've tried with a simplest get() possible and it worked fine..it seems it's getting the pixels that eat up all the memory.. but the picture is small.. and 1 image in memory shouldn't be a problem... I might be missing something..
1