Skip to content

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

@nagendra6969

Description

@nagendra6969

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions