close_library() now closes camera and removes handle refs