Save and load the system#2
Conversation
There was a problem hiding this comment.
the code is cleaner with your changes, but you manage the case mpLoopCloser->isRunningGBA() ?
There was a problem hiding this comment.
mpLoopCloser->isRunningGBA() is here to wait a thread create by mpLoopCloser (named mpThreadGBA), this thread execute RunGlobalBundleAdjustment.
The pipeline work like that: The main loop of mpLoopCloser call CorrectLoop in each iteration, then CorrectLoop check if mpThreadGBA is running (by calling isRunningGBA()) , and if it's true, mpThreadGBA is detached in order to create another thread with the same function (RunGlobalBundleAdjustment).
I've added a join on this thread in the main loop when it's finished, to wait in mpLoopCloser instead of wait in the system.
There was a problem hiding this comment.
why no test with nullptr on this pointer?
There was a problem hiding this comment.
well, the correct code is delete mptViewer; as delete NULL; or delete nullptr; is not going to break. delete test for nullptr by itself, no need to add boiler code ,-)
There was a problem hiding this comment.
ok, but usage message must also be changed
There was a problem hiding this comment.
#pragma once or #ifndef SYSTEM_H you have to choose 😄
|
The description of the pull-request is really very light 😛 |
ba0734d to
96503d5
Compare
5149723 to
f89c44e
Compare
c1b2c16 to
c988963
Compare
c988963 to
3c1b1c9
Compare
dweckmann
left a comment
There was a problem hiding this comment.
the if(pointer != nullptr)delete pointer; are useless but that's nitpicking...
| int fIniThFAST = orbParams.m_iniThFAST; | ||
| int fMinThFAST = orbParams.m_minThFAST; | ||
|
|
||
| if(mpORBextractorLeft != nullptr) delete mpORBextractorLeft; |
There was a problem hiding this comment.
testing nullptr is not needed delete operator take care of that
Uh oh!
There was an error while loading. Please reload this page.