소스 검색

Close the bal_problem file when done reading it.

Change-Id: I2755822cd2caf4019059e5b4a50f30077142e37f
Markus Moll 13 년 전
부모
커밋
82b689a5fd
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      examples/bal_problem.cc

+ 2 - 0
examples/bal_problem.cc

@@ -83,6 +83,8 @@ BALProblem::BALProblem(const std::string filename, bool use_quaternions) {
     FscanfOrDie(fptr, "%lf", parameters_ + i);
     FscanfOrDie(fptr, "%lf", parameters_ + i);
   }
   }
 
 
+  fclose(fptr);
+
   use_quaternions_ = use_quaternions;
   use_quaternions_ = use_quaternions;
   if (use_quaternions) {
   if (use_quaternions) {
     // Switch the angle-axis rotations to quaternions.
     // Switch the angle-axis rotations to quaternions.