RLPark 1.0.0
Reinforcement Learning Framework in Java

MemoryLeak.java

Go to the documentation of this file.
00001 package rlpark.plugin.opencv.samples;
00002 
00003 import com.googlecode.javacv.OpenCVFrameGrabber;
00004 
00005 public class MemoryLeak implements Runnable {
00006   public MemoryLeak() throws Exception {
00007   }
00008 
00009   private void protectedRun() throws Exception {
00010     OpenCVFrameGrabber grabber = new OpenCVFrameGrabber(0);
00011     grabber.start();
00012     while (true) {
00013       grabber.grab();
00014     }
00015   }
00016 
00017   @Override
00018   public void run() {
00019     try {
00020       protectedRun();
00021     } catch (Exception e) {
00022       e.printStackTrace();
00023     }
00024   }
00025 
00026   public static void main(String[] args) throws Exception {
00027     Thread thread = new Thread(new MemoryLeak());
00028     thread.start();
00029     while (true) {
00030       Thread.sleep(10000);
00031     }
00032   }
00033 }
 All Classes Namespaces Files Functions Variables Enumerations
Zephyr
RLPark