mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 00:37:46 +08:00
ros-pkg: fixed some memory leaks in data_recorder node
git-svn-id: http://rtabmap.googlecode.com/svn/trunk/ros-pkg@1057 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -40,7 +40,11 @@ class DataRecorderWrapper
|
|||||||
public:
|
public:
|
||||||
DataRecorderWrapper() :
|
DataRecorderWrapper() :
|
||||||
fileName_(""),
|
fileName_(""),
|
||||||
frameId_("base_link")
|
frameId_("base_link"),
|
||||||
|
depthScanSync_(0),
|
||||||
|
depthSync_(0),
|
||||||
|
scanSync_(0),
|
||||||
|
depthImageSync_(0)
|
||||||
{
|
{
|
||||||
ros::NodeHandle pnh("~");
|
ros::NodeHandle pnh("~");
|
||||||
|
|
||||||
@@ -62,6 +66,18 @@ public:
|
|||||||
return recorder_.init(fileName_.c_str());
|
return recorder_.init(fileName_.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual ~DataRecorderWrapper()
|
||||||
|
{
|
||||||
|
if(depthScanSync_)
|
||||||
|
delete depthScanSync_;
|
||||||
|
if(depthSync_)
|
||||||
|
delete depthSync_;
|
||||||
|
if(scanSync_)
|
||||||
|
delete scanSync_;
|
||||||
|
if(depthImageSync_)
|
||||||
|
delete depthImageSync_;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setupCallbacks(
|
void setupCallbacks(
|
||||||
bool subscribeOdom,
|
bool subscribeOdom,
|
||||||
|
|||||||
Reference in New Issue
Block a user