AppDelegate // Boost memory limiter to 512MB.

This commit is contained in:
ShikiSuen 2022-11-27 18:38:45 +08:00
parent 15188f0eed
commit 681a704ea4
1 changed files with 1 additions and 1 deletions

View File

@ -113,7 +113,7 @@ extension AppDelegate {
guard let currentMemorySizeInBytes = NSApplication.memoryFootprint else { return 0 } guard let currentMemorySizeInBytes = NSApplication.memoryFootprint else { return 0 }
let currentMemorySize: Double = (Double(currentMemorySizeInBytes) / 1024 / 1024).rounded(toPlaces: 1) let currentMemorySize: Double = (Double(currentMemorySizeInBytes) / 1024 / 1024).rounded(toPlaces: 1)
switch currentMemorySize { switch currentMemorySize {
case 300...: case 512...:
vCLog("WARNING: EXCESSIVE MEMORY FOOTPRINT (\(currentMemorySize)MB).") vCLog("WARNING: EXCESSIVE MEMORY FOOTPRINT (\(currentMemorySize)MB).")
let userNotification = NSUserNotification() let userNotification = NSUserNotification()
userNotification.title = NSLocalizedString("vChewing", comment: "") userNotification.title = NSLocalizedString("vChewing", comment: "")