diff options
author | Sven Gothel <[email protected]> | 2021-11-15 05:24:41 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2021-11-15 05:24:41 +0100 |
commit | 194195fdaad14eec8307a6fe6ae06faa18cf5a43 (patch) | |
tree | 7adca694ad72fe1ad0e5e69fabebc9a163fc00de /examples | |
parent | 1ce10a22624544aee38526f7fabf4598cd4324d1 (diff) |
dbt_peripheral00: Drop virtual on override; DBTPeripheral00: Drop overriding finalize() and call super.close() on close()
Diffstat (limited to 'examples')
-rw-r--r-- | examples/dbt_peripheral00.cpp | 2 | ||||
-rw-r--r-- | examples/java/DBTPeripheral00.java | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/examples/dbt_peripheral00.cpp b/examples/dbt_peripheral00.cpp index 331ca0e1..fbfdfe7a 100644 --- a/examples/dbt_peripheral00.cpp +++ b/examples/dbt_peripheral00.cpp @@ -417,7 +417,7 @@ class MyGATTServerListener : public DBGattServer::Listener { } } - virtual void mtuChanged(BTDeviceRef device, const uint16_t mtu) override { + void mtuChanged(BTDeviceRef device, const uint16_t mtu) override { const bool match = matches(device); fprintf_td(stderr, "****** GATT::mtuChanged(match %d): %d -> %d, %s\n", match, match ? (int)usedMTU : 0, (int)mtu, device->toString().c_str()); diff --git a/examples/java/DBTPeripheral00.java b/examples/java/DBTPeripheral00.java index cbb32b01..3d1e1a84 100644 --- a/examples/java/DBTPeripheral00.java +++ b/examples/java/DBTPeripheral00.java @@ -404,9 +404,6 @@ public class DBTPeripheral00 { } @Override - public void finalize() { close(); } - - @Override public void close() { { final boolean local = sync_data; // SC-DRF acquire via sc_atomic_bool::load() @@ -419,6 +416,7 @@ public class DBTPeripheral00 { pulseSenderThread.join(1000); } catch (final InterruptedException e) { } } + super.close(); } @Override |