+ __pInstance = pInst.release();
+
+ std::atexit(DeinitializeSingleton);
+}
+
+void
+_BluetoothHdpSystemAdapter::DeinitializeSingleton(void)
+{
+ // unregister the callback methods from the underlying layer
+ int err = bt_hdp_unset_connection_state_changed_cb();
+ SysLog(NID_NET_BT, "[0x%x] error in unregistering the connection state change callback method", err);
+
+ err = bt_hdp_unset_data_received_cb();
+ SysLog(NID_NET_BT, "[0x%x] error in unregistering the data received state change callback method", err);