diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2016-10-07 16:20:20 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2016-10-07 16:20:20 +0900 |
commit | 14302ddbac1e6d9c95de15c97362c3de09f545eb (patch) | |
tree | ce55d67815b1081a8c942fb6432134e056c4dd6c /room.cpp | |
parent | ab45e1aee912cf242caea2d762b2b27c83a0e972 (diff) | |
download | libquotient-14302ddbac1e6d9c95de15c97362c3de09f545eb.tar.gz libquotient-14302ddbac1e6d9c95de15c97362c3de09f545eb.zip |
Fixed massive leaks of Event objects
Diffstat (limited to 'room.cpp')
-rw-r--r-- | room.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -119,7 +119,7 @@ QString Room::id() const return d->id; } -Room::Timeline Room::messageEvents() const +const Room::Timeline& Room::messageEvents() const { return d->messageEvents; } @@ -329,7 +329,7 @@ QString Room::roomMembername(QString userId) const return roomMembername(connection()->user(userId)); } -void Room::updateData(const SyncRoomData& data) +void Room::updateData(SyncRoomData& data) { if( d->prevBatch.isEmpty() ) d->prevBatch = data.timelinePrevBatch; @@ -339,7 +339,7 @@ void Room::updateData(const SyncRoomData& data) // State changes can arrive in a timeline event; so check those. processStateEvents(data.timeline); - addNewMessageEvents(data.timeline); + addNewMessageEvents(data.timeline.release()); for( Event* ephemeralEvent: data.ephemeral ) { |