mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Add crash on high memory usage
This commit is contained in:
parent
efd4dc618d
commit
2028561610
1 changed files with 6 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue