Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with crashing because of memory increase when changing the language #68

Open
nagendra6969 opened this issue Jul 8, 2024 · 0 comments

Comments

@nagendra6969
Copy link

nagendra6969 commented Jul 8, 2024

Issue

Spanish and English are the two languages that my application supports. when I switch between languages several times. My system keeps crashing due to an increase in memory.

we have created file called lang-es.JSON to create Spanish keys.

Localize Environment

Localize version: (2.3.0)
Xcode version: 15.0 (15A240d)
Swift version: 4.2
Platform(s) running Localize: iOS 17
macOS version running Xcode: Sonoma 14.5

Localize Config

Localize.update(defaultLanguage: langCode)
Localize.update(language: langCode)

as i observed the code, memory is increasing due to

NotificationCenter.default.post(`
            name: Notification.Name(rawValue: localizeChangeNotification),
            object: nil
        )

inside the method update(language: String) of LocalizeCommonProtocol. Notification observer memory won't grow if I comment it out, and the language won't change either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant