cameraViewEx / com.priyankvasa.android.cameraviewex / CameraView / destroy

destroy

fun destroy(): Unit

Clear all listeners, stop camera, and kill background threads. Once destroy is called, camera cannot be started. A new CameraView instance must be created to use camera again. This is typically called from fragment's onDestroyView callback.