diff options
author | Feng Xiao <xfxyjwf@gmail.com> | 2014-12-03 16:31:47 -0800 |
---|---|---|
committer | Feng Xiao <xfxyjwf@gmail.com> | 2014-12-03 16:31:47 -0800 |
commit | 137dd0f17f91ca008fa2ab0a17b1e02865e8f8ca (patch) | |
tree | 75450f3a5f3819eba4b061ec20c96e8936685834 /src/google/protobuf/descriptor.cc | |
parent | 35ef68056cf84f581c2eab389f78a876f13cd661 (diff) |
Delete some globals in ShutdownProtobufLibrary().
Diffstat (limited to 'src/google/protobuf/descriptor.cc')
-rw-r--r-- | src/google/protobuf/descriptor.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/google/protobuf/descriptor.cc b/src/google/protobuf/descriptor.cc index 19d49cab..b8dd198d 100644 --- a/src/google/protobuf/descriptor.cc +++ b/src/google/protobuf/descriptor.cc @@ -345,6 +345,10 @@ typedef hash_map<string, const SourceCodeInfo_Location*> LocationsByPathMap; set<string>* allowed_proto3_extendees_ = NULL; GOOGLE_PROTOBUF_DECLARE_ONCE(allowed_proto3_extendees_init_); +void DeleteAllowedProto3Extendee() { + delete allowed_proto3_extendees_; +} + void InitAllowedProto3Extendee() { allowed_proto3_extendees_ = new set<string>; allowed_proto3_extendees_->insert("google.protobuf.FileOptions"); @@ -354,6 +358,7 @@ void InitAllowedProto3Extendee() { allowed_proto3_extendees_->insert("google.protobuf.EnumValueOptions"); allowed_proto3_extendees_->insert("google.protobuf.ServiceOptions"); allowed_proto3_extendees_->insert("google.protobuf.MethodOptions"); + google::protobuf::internal::OnShutdown(&DeleteAllowedProto3Extendee); } // Checks whether the extendee type is allowed in proto3. |