Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ICU-20036 CurrencyPluralInfo class improve handling of OOM errors (#17)
ICU-20036 CurrencyPluralInfo class doesn't always check/handle OOM errors. Changes include: - Using LocalPointer instead of raw new/delete, in order to make the code cleaner. - Using nullptr instead of NULL. - Inspired by Andy's review feedback PluralRules changes, this change sets fPluralRules and fLocale to nullptr in the assignment operator in order to prevent possible double deletes in the failure case. - More consistent about not checking for nullptr when calling delete. - Using LocalUResourceBundlePointer in order to simply the code and not need manual deletes. - Reduce memory usage by using the same LocalUResourceBundle with .getAlias() instead of allocating new ones.
- Loading branch information