We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
Memory leak playing video (Read 524 times)
Memory leak playing video
Dec 18th, 2009, 2:09am
 

Hi, Anyone have any idea why this simple program leaks memory on both Windows and MacOS? It consumes more and more memory until finally the OS kills it.

import processing.video.*;

Movie movie;
String movieFileName =
"/Users/stein/Documents/Processing/summer05/Clips/MVI_1626.AVI";

void setup() {
 size(320, 240, P2D);
 movie = new Movie(this, movieFileName);
 movie.play();
 movie.speed(16.0);
}

void draw() {
 if (movie.duration() == movie.time()) {
   movie.stop();
   movie = new Movie(this, movieFileName);
   movie.play();
   movie.speed(16.0);
 }
 image(movie, 0, 0);
}

void movieEvent(Movie m) {
 m.read();
}
Page Index Toggle Pages: 1