code: protected void dispose() {
  
  		assert disposed != null;
  		assert open != null;
  		assert driver != null;
  		assert device != null;
  		assert listeners != null;
  
  		if (!disposed.compareAndSet(false, true)) {
  			return;
  		}
  
  		open.set(false);
  
  		LOG.info("Disposing webcam {}", getName());
  
  		WebcamDisposeTask task = new WebcamDisposeTask(driver, device);
  		try {
  			task.dispose();
  		} catch (InterruptedException e) {
  			LOG.error("Processor has been interrupted before webcam was disposed!", e);
  			return;
  		}
  
  		WebcamEvent we = new WebcamEvent(WebcamEventType.DISPOSED, this);
  		Iterator<WebcamListener> wli = listeners.iterator();
  		WebcamListener l = null;
  
  		while (wli.hasNext()) {
  			l = wli.next();
  			try {
  				l.webcamClosed(we);
  				l.webcamDisposed(we);
  			} catch (Exception e) {
  				LOG.error(String.format("Notify webcam disposed, exception when calling %s listener", l.getClass()), e);
  			}
  		}
  
  		removeShutdownHook();
  
  		LOG.debug("Webcam disposed {}", getName());
  	}
docs: Completely dispose capture device. After this operation webcam cannot be used any more and
  full reinstantiation is required.