diff --git a/src/call/call-p.h b/src/call/call-p.h index 537f730fb..94ec4cf07 100644 --- a/src/call/call-p.h +++ b/src/call/call-p.h @@ -37,7 +37,6 @@ class CallSession; class CallPrivate : public ObjectPrivate, public CallSessionListener { public: CallPrivate () = default; - virtual ~CallPrivate () = default; void initiateIncoming (); bool initiateOutgoing (); diff --git a/src/chat/chat-room/real-time-text-chat-room-p.h b/src/chat/chat-room/real-time-text-chat-room-p.h index 8819976ac..c8e5e2b62 100644 --- a/src/chat/chat-room/real-time-text-chat-room-p.h +++ b/src/chat/chat-room/real-time-text-chat-room-p.h @@ -30,7 +30,6 @@ LINPHONE_BEGIN_NAMESPACE class RealTimeTextChatRoomPrivate : public BasicChatRoomPrivate { public: RealTimeTextChatRoomPrivate () = default; - ~RealTimeTextChatRoomPrivate (); void realtimeTextReceived (uint32_t character, LinphoneCall *call); void sendChatMessage (const std::shared_ptr &chatMessage) override; diff --git a/src/chat/chat-room/real-time-text-chat-room.cpp b/src/chat/chat-room/real-time-text-chat-room.cpp index 31da01d53..0122e086b 100644 --- a/src/chat/chat-room/real-time-text-chat-room.cpp +++ b/src/chat/chat-room/real-time-text-chat-room.cpp @@ -30,13 +30,6 @@ using namespace std; LINPHONE_BEGIN_NAMESPACE -RealTimeTextChatRoomPrivate::~RealTimeTextChatRoomPrivate () { - if (!receivedRttCharacters.empty()) { - for (auto &rttChars : receivedRttCharacters) - bctbx_free(rttChars); - } -} - // ----------------------------------------------------------------------------- void RealTimeTextChatRoomPrivate::realtimeTextReceived (uint32_t character, LinphoneCall *call) { @@ -106,6 +99,14 @@ void RealTimeTextChatRoomPrivate::sendChatMessage (const shared_ptr RealTimeTextChatRoom::RealTimeTextChatRoom (const shared_ptr &core, const ChatRoomId &chatRoomId) : BasicChatRoom(*new RealTimeTextChatRoomPrivate, core, chatRoomId) {} +RealTimeTextChatRoom::~RealTimeTextChatRoom () { + L_D(); + + if (!d->receivedRttCharacters.empty()) + for (auto &rttChars : d->receivedRttCharacters) + bctbx_free(rttChars); +} + RealTimeTextChatRoom::CapabilitiesMask RealTimeTextChatRoom::getCapabilities () const { return BasicChatRoom::getCapabilities() | Capabilities::RealTimeText; } diff --git a/src/chat/chat-room/real-time-text-chat-room.h b/src/chat/chat-room/real-time-text-chat-room.h index b5ea5550d..7206bf3bc 100644 --- a/src/chat/chat-room/real-time-text-chat-room.h +++ b/src/chat/chat-room/real-time-text-chat-room.h @@ -32,6 +32,8 @@ class LINPHONE_PUBLIC RealTimeTextChatRoom : public BasicChatRoom { friend class CorePrivate; public: + ~RealTimeTextChatRoom (); + CapabilitiesMask getCapabilities () const override; uint32_t getChar () const; diff --git a/src/chat/cpim/header/cpim-header-p.h b/src/chat/cpim/header/cpim-header-p.h index 95734061b..048e91309 100644 --- a/src/chat/cpim/header/cpim-header-p.h +++ b/src/chat/cpim/header/cpim-header-p.h @@ -29,9 +29,6 @@ LINPHONE_BEGIN_NAMESPACE namespace Cpim { class HeaderPrivate : public ObjectPrivate { - public: - virtual ~HeaderPrivate () = default; - private: std::string value; diff --git a/src/conference/handlers/remote-conference-event-handler-p.h b/src/conference/handlers/remote-conference-event-handler-p.h index 85a7134ba..8d4a06836 100644 --- a/src/conference/handlers/remote-conference-event-handler-p.h +++ b/src/conference/handlers/remote-conference-event-handler-p.h @@ -33,7 +33,6 @@ LINPHONE_BEGIN_NAMESPACE class RemoteConferenceEventHandlerPrivate : public ObjectPrivate, public CoreListener { private: - ~RemoteConferenceEventHandlerPrivate(); void simpleNotifyReceived (const std::string &xmlBody); void subscribe (); void unsubscribe (); diff --git a/src/conference/handlers/remote-conference-event-handler.cpp b/src/conference/handlers/remote-conference-event-handler.cpp index 52dd3fc14..be600d67f 100644 --- a/src/conference/handlers/remote-conference-event-handler.cpp +++ b/src/conference/handlers/remote-conference-event-handler.cpp @@ -42,12 +42,6 @@ using namespace Xsd::ConferenceInfo; // ----------------------------------------------------------------------------- -RemoteConferenceEventHandlerPrivate::~RemoteConferenceEventHandlerPrivate(){ - if (lev){ - unsubscribe(); - } -} - void RemoteConferenceEventHandlerPrivate::simpleNotifyReceived (const string &xmlBody) { istringstream data(xmlBody); unique_ptr confInfo = parseConferenceInfo(data, Xsd::XmlSchema::Flags::dont_validate); @@ -63,7 +57,7 @@ void RemoteConferenceEventHandlerPrivate::simpleNotifyReceived (const string &xm if (entityAddress == chatRoomId.getPeerAddress()) { if (confInfo->getVersion().present()) lastNotify = confInfo->getVersion().get(); - + if (confInfo->getConferenceDescription().present()) { if (confInfo->getConferenceDescription().get().getSubject().present() && !confInfo->getConferenceDescription().get().getSubject().get().empty() @@ -241,6 +235,9 @@ Object(*new RemoteConferenceEventHandlerPrivate) { RemoteConferenceEventHandler::~RemoteConferenceEventHandler () { L_D(); d->conf->getCore()->getPrivate()->unregisterListener(d); + + if (d->lev) + unsubscribe(); } // -----------------------------------------------------------------------------