mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 21:13:33 +08:00
px4io driver: Deallocate perf counters in destructor properly
This commit is contained in:
@@ -529,6 +529,11 @@ PX4IO::~PX4IO()
|
|||||||
if (_interface != nullptr)
|
if (_interface != nullptr)
|
||||||
delete _interface;
|
delete _interface;
|
||||||
|
|
||||||
|
/* deallocate perfs */
|
||||||
|
perf_free(_perf_update);
|
||||||
|
perf_free(_perf_write);
|
||||||
|
perf_free(_perf_chan_count);
|
||||||
|
|
||||||
g_dev = nullptr;
|
g_dev = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user