Fix some memory leaks.

This commit is contained in:
Ghislain MARY 2017-09-22 10:25:32 +02:00
parent 3b08856dc0
commit c73614b852
3 changed files with 8 additions and 4 deletions

View file

@ -30,6 +30,10 @@ RemoteConference::RemoteConference (LinphoneCore *core, const Address &myAddress
eventHandler = new RemoteConferenceEventHandler(core, this);
}
RemoteConference::~RemoteConference () {
delete eventHandler;
}
// -----------------------------------------------------------------------------
shared_ptr<Participant> RemoteConference::addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia) {

View file

@ -29,7 +29,7 @@ LINPHONE_BEGIN_NAMESPACE
class RemoteConference : public Conference, public ConferenceListener {
public:
RemoteConference (LinphoneCore *core, const Address &myAddress, CallListener *listener = nullptr);
virtual ~RemoteConference() = default;
virtual ~RemoteConference();
protected:
std::shared_ptr<Participant> focus = nullptr;

View file

@ -72,11 +72,11 @@ MediaSessionPrivate::MediaSessionPrivate (const Conference &conference, const Ca
params = new MediaSessionParams(*(reinterpret_cast<const MediaSessionParams *>(csp)));
currentParams = new MediaSessionParams();
audioStats = linphone_call_stats_ref(_linphone_call_stats_new());
audioStats = _linphone_call_stats_new();
initStats(audioStats, LinphoneStreamTypeAudio);
videoStats = linphone_call_stats_ref(_linphone_call_stats_new());
videoStats = _linphone_call_stats_new();
initStats(videoStats, LinphoneStreamTypeVideo);
textStats = linphone_call_stats_ref(_linphone_call_stats_new());
textStats = _linphone_call_stats_new();
initStats(textStats, LinphoneStreamTypeText);
int minPort, maxPort;