You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This snippet starts at line 189 in AccountStore.swift
varlistenReferenceRoom:Any?publicfunc paginate(room:NIORoom, event:MXEvent){lettimeline= room.room.timeline(onEvent: event.eventId)
listenReferenceRoom = timeline?.listenToEvents{ event, direction, roomState in
if direction ==.backwards {
room.add(event: event, direction: direction, roomState: roomState)}self.objectWillChange.send()}
timeline?.resetPaginationAroundInitialEvent(withLimit:40){ _ inself.objectWillChange.send()}}
Every time this method is called, listenReferenceRoom is overwritten with a new value and the old one is not removed from listeners. Pretty sure that's a necessary thing, but not an expert in MatrixSDK to know for sure.
Something similar happens on line 151 in the same file, but I believe that method is only called once through the lifetime of the app.
The text was updated successfully, but these errors were encountered:
mredig
changed the title
Probably memory leak
Probable memory leak
Aug 9, 2022
This snippet starts at line 189 in
AccountStore.swift
Every time this method is called,
listenReferenceRoom
is overwritten with a new value and the old one is not removed from listeners. Pretty sure that's a necessary thing, but not an expert in MatrixSDK to know for sure.Something similar happens on line 151 in the same file, but I believe that method is only called once through the lifetime of the app.
The text was updated successfully, but these errors were encountered: