mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #1910 from c1728p9/add_virtual_destructors
Add virtual destructor to classespull/1872/merge
commit
f3c125fca2
|
@ -103,6 +103,10 @@ public:
|
|||
}
|
||||
#endif
|
||||
|
||||
virtual ~AnalogIn() {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
virtual void lock() {
|
||||
|
|
|
@ -122,6 +122,10 @@ public:
|
|||
}
|
||||
#endif
|
||||
|
||||
virtual ~AnalogOut() {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
virtual void lock() {
|
||||
|
|
|
@ -145,6 +145,10 @@ public:
|
|||
*/
|
||||
virtual void unlock(void);
|
||||
|
||||
virtual ~I2C() {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
#if DEVICE_I2C_ASYNCH
|
||||
|
||||
/** Start non-blocking I2C transfer.
|
||||
|
|
|
@ -113,14 +113,13 @@ public:
|
|||
*/
|
||||
bool remove_handler(pFunctionPointer_t handler, IRQn_Type irq);
|
||||
|
||||
protected:
|
||||
virtual void lock();
|
||||
virtual void unlock();
|
||||
|
||||
private:
|
||||
InterruptManager();
|
||||
~InterruptManager();
|
||||
|
||||
void lock();
|
||||
void unlock();
|
||||
|
||||
// We declare the copy contructor and the assignment operator, but we don't
|
||||
// implement them. This way, if someone tries to copy/assign our instance,
|
||||
// he will get an error at compile time.
|
||||
|
|
Loading…
Reference in New Issue