mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-03 21:16:35 +00:00
mtproto memory leak bug fix [skip ci]
This commit is contained in:
parent
14f9d04a36
commit
d56ec6c1f2
@ -1394,7 +1394,7 @@ static int32_t fixedTimeDifferenceValue = 0;
|
||||
NSArray *currentListeners = [[NSArray alloc] initWithArray:strongSelf->_changeListeners];
|
||||
for (id<MTContextChangeListener> listener in currentListeners) {
|
||||
if ([listener respondsToSelector:@selector(contextLoggedOut:)])
|
||||
[listener contextLoggedOut:self];
|
||||
[listener contextLoggedOut:strongSelf];
|
||||
}
|
||||
}
|
||||
}];
|
||||
|
||||
@ -235,7 +235,7 @@ static const NSUInteger MTMaxUnacknowledgedMessageCount = 64;
|
||||
if ((_mtState & MTProtoStateStopped) == 0)
|
||||
{
|
||||
[self setMtState:_mtState | MTProtoStateStopped];
|
||||
|
||||
[_context removeChangeListener:self];
|
||||
if (_transport != nil)
|
||||
{
|
||||
_transport.delegate = nil;
|
||||
@ -2098,6 +2098,9 @@ static NSString *dumpHexString(NSData *data, int maxLength) {
|
||||
int64_t dataMessageId = 0;
|
||||
bool parseError = false;
|
||||
NSArray *parsedMessages = [self _parseIncomingMessages:decryptedData dataMessageId:&dataMessageId parseError:&parseError];
|
||||
|
||||
|
||||
|
||||
for (MTIncomingMessage *message in parsedMessages) {
|
||||
if ([message.body isKindOfClass:[MTRpcResultMessage class]]) {
|
||||
MTRpcResultMessage *rpcResultMessage = message.body;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user