aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Tsou <ttsou@vt.edu>2012-03-16 20:19:02 -0400
committerAlexander Chemeris <Alexander.Chemeris@gmail.com>2013-06-24 01:51:02 +0400
commit1f330a9801861083e2cfec0e785b5a10e8dd5c48 (patch)
tree61c591e901b5ec9bc9048e7084f9b8fb48b68236
parent7c6f58af7a9685c50f33ea72c7bddc884b85de2f (diff)
transceiver: define virtual destructor for base device
Lack of an explicitly defined virtual destructor was causing the empty default interface destructor to be called, which created a memory leak at shutdown. Signed-off-by: Thomas Tsou <ttsou@vt.edu>
-rw-r--r--Transceiver52M/radioDevice.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Transceiver52M/radioDevice.h b/Transceiver52M/radioDevice.h
index b796ffd..39f1de2 100644
--- a/Transceiver52M/radioDevice.h
+++ b/Transceiver52M/radioDevice.h
@@ -38,6 +38,8 @@ class RadioDevice {
static RadioDevice *make(int sps, bool skipRx = false);
+ virtual ~RadioDevice() {};
+
/** Initialize the USRP */
virtual int open(const std::string &args)=0;
@@ -134,7 +136,6 @@ class RadioDevice {
virtual double getSampleRate()=0;
virtual double numberRead()=0;
virtual double numberWritten()=0;
-
};
#endif