public void dispose(){
  if (ffmpeg != null) {
    try {
      ffmpeg.flush();
      ffmpeg.close();
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
  if (process != null) {
    try {
      Thread.sleep(1000);
      process.destroy();
      process.waitFor();
    }
 catch (    InterruptedException e) {
      PApplet.println("Waiting for ffmpeg timed out!");
      e.printStackTrace();
    }
  }
  processBuilder=null;
  process=null;
  img=null;
  parent=null;
  ffmpeg=null;
  ffmpegOutputMsg=null;
  settings=null;
  PApplet.println(outputFilePath,"saved.");
}

public void dispose ( ) { if ( ffmpeg != null ) { try { ffmpeg . flush ( ) ; ffmpeg . close ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } } if ( process != null ) { try { Thread . sleep ( 1000 ) ; process . destroy ( ) ; process . waitFor ( ) ; } catch ( InterruptedException e ) { PApplet . println ( "Waiting for ffmpeg timed out!" ) ; e . printStackTrace ( ) ; } } processBuilder = null ; process = null ; img = null ; parent = null ; ffmpeg = null ; ffmpegOutputMsg = null ; settings = null ; PApplet . println ( outputFilePath , "saved." ) ; }
called automatically by processing to clean up before shut down
