diff options
author | Virendra Kakade <virendra.kakade@ni.com> | 2019-04-24 14:36:42 -0700 |
---|---|---|
committer | Brent Stapleton <brent.stapleton@ettus.com> | 2019-05-01 15:17:23 -0700 |
commit | 2001ac61e0208c11b02923583ad13c0901fb3e23 (patch) | |
tree | 2d083f2b640f0150aa685f333d5cf204f37adc69 | |
parent | 1b8b9c861edcaa74a42cae061029cfe7b14cbd6f (diff) | |
download | uhd-2001ac61e0208c11b02923583ad13c0901fb3e23.tar.gz uhd-2001ac61e0208c11b02923583ad13c0901fb3e23.tar.bz2 uhd-2001ac61e0208c11b02923583ad13c0901fb3e23.zip |
mpmd: Release resources on destruction
This will clear the property tree, block registry, transport managers,
and motherboard list on destruction of mpmd_impl.
-rw-r--r-- | host/lib/usrp/mpmd/mpmd_impl.cpp | 4 | ||||
-rw-r--r-- | host/lib/usrp/mpmd/mpmd_mboard_impl.cpp | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/host/lib/usrp/mpmd/mpmd_impl.cpp b/host/lib/usrp/mpmd/mpmd_impl.cpp index 2f3584498..05d847060 100644 --- a/host/lib/usrp/mpmd/mpmd_impl.cpp +++ b/host/lib/usrp/mpmd/mpmd_impl.cpp @@ -231,7 +231,9 @@ mpmd_impl::mpmd_impl(const device_addr_t& device_args) mpmd_impl::~mpmd_impl() { - /* nop */ + _rfnoc_block_ctrl.clear(); + _tree.reset(); + _mb.clear(); } /***************************************************************************** diff --git a/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp b/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp index e2d347778..8bf8d6826 100644 --- a/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp +++ b/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp @@ -302,9 +302,9 @@ mpmd_mboard_impl::mpmd_mboard_impl( mpmd_mboard_impl::~mpmd_mboard_impl() { - // Destroy the claimer task to avoid spurious asynchronous reclaim call after the - // unclaim. - UHD_SAFE_CALL(dump_logs(); _claimer_task.reset(); + // Destroy the claimer task to avoid spurious asynchronous reclaim call + // after the unclaim. + UHD_SAFE_CALL(dump_logs(); _claimer_task.reset(); _xport_mgr.reset(); if (not rpc->request_with_token<bool>("unclaim")) { UHD_LOG_WARNING("MPMD", "Failure to ack unclaim!"); }); |