WIP: valgrind runtime analysis and fixes (#6521)

* Fix several valgrind identified mem leaks

* Added callgrind target.

* px4_posix_tasks use nullptr
This commit is contained in:
James Goppert
2017-02-17 12:36:52 -05:00
committed by GitHub
parent a0f00f84f3
commit 7659402fdb
6 changed files with 67 additions and 51 deletions
+8 -1
View File
@@ -278,7 +278,14 @@ private:
_actuator_outputs_sub[i] = -1;
}
}
~Simulator() { _instance = NULL; }
~Simulator()
{
if (_instance != nullptr) {
delete _instance;
}
_instance = NULL;
}
void initializeSensorData();