Quantcast
Channel: Processing Forum
Viewing all articles
Browse latest Browse all 1768

Re : many copy calls lead to OutOfMemoryError

$
0
0
The problem is almost certainly caused by line 30

PImage slice = createImage(size, pg.height, RGB);

since this is called from the draw method it is creating a new image approximately 60 times a second and I suspect that the garbage collector is not keeping up with the program.

You need to think carefully about what you want to achieve and design an algorithm that does not invlove creating PImage every frame.

Viewing all articles
Browse latest Browse all 1768

Trending Articles