Browse Source

Cpp:Fix a small memory leak.

pull/567/head
Philip Liard 15 years ago
committed by Mihaela Rosca
parent
commit
4525581036
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      cpp/src/phonenumberutil.cc

+ 6
- 0
cpp/src/phonenumberutil.cc View File

@ -737,6 +737,12 @@ PhoneNumberUtil::PhoneNumberUtil(MetadataProvider* provider)
} }
PhoneNumberUtil::~PhoneNumberUtil() { PhoneNumberUtil::~PhoneNumberUtil() {
for (vector<IntRegionsPair>::const_iterator it =
country_code_to_region_code_map_->begin();
it != country_code_to_region_code_map_->end();
++it) {
delete it->second;
}
} }
// Public wrapper function to get a PhoneNumberUtil instance with the default // Public wrapper function to get a PhoneNumberUtil instance with the default


Loading…
Cancel
Save