Long exit from program (long runtime exit). after save SVM opencv it is take long time to exit program
I used SVM in OpenCV 3.x and after save SVM, the program takes long time to exit:
Ptr<TrainData> td1 = TrainData::create(trainingDataMat, ROW_SAMPLE, labelsMat);
svm->trainAuto(td1);
cout << " save svm" << endl;
svm->save(fileSVM);
I used F10 to find problem and I found that
#ifndef _CRT_APP
exit(mainret);
may take this problem. How can solve this problem?
Thanks in advance.
where did you find the exit code ? is it part of the opencv library ?
opencv / os / compiler versions ?
the code outside of my code. not in opencv library. opencv 3.1, windows 7, 64bit, visual studio 2013, c++
since this seems to be more a vs/win issue, - what kind of project do you use ? (you probably should start with an empty one)
I guess that
exit(mainret);
call is waiting untill the garbage collector has finished cleaning everything up periodically. Like @berak said, you would want a C++ project without extra code, to actually see if it is due to OpenCV or not!