mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Add crash on high memory usage
This commit is contained in:
parent
efd4dc618d
commit
2028561610
@ -1482,6 +1482,12 @@ private func extractAccountManagerState(records: AccountRecordsView<TelegramAcco
|
||||
if abs(value - previousReportedMemoryConsumption) > 1 * 1024 * 1024 {
|
||||
previousReportedMemoryConsumption = value
|
||||
Logger.shared.log("App \(self.episodeId)", "Memory consumption: \(value / (1024 * 1024)) MB")
|
||||
|
||||
if !buildConfig.isAppStoreBuild {
|
||||
if value >= 1 * 1024 * 1024 * 1024 {
|
||||
preconditionFailure()
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user