diff options
author | Jisi Liu <jisi.liu@gmail.com> | 2016-09-23 11:17:00 -0700 |
---|---|---|
committer | Bo Yang <teboring@google.com> | 2016-10-10 11:44:21 -0700 |
commit | 4cf072248fc39d1c63dcb1600ff9e73df8757779 (patch) | |
tree | 0eff71b46678e988703a06e96d3a00681debd453 /src/google/protobuf/api.pb.cc | |
parent | f9f3c35eb36b208d99a85a21c05767dfd36f2968 (diff) | |
download | protobuf-4cf072248fc39d1c63dcb1600ff9e73df8757779.tar.gz protobuf-4cf072248fc39d1c63dcb1600ff9e73df8757779.tar.bz2 protobuf-4cf072248fc39d1c63dcb1600ff9e73df8757779.zip |
Fix default instance destructor
Diffstat (limited to 'src/google/protobuf/api.pb.cc')
-rw-r--r-- | src/google/protobuf/api.pb.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/google/protobuf/api.pb.cc b/src/google/protobuf/api.pb.cc index bd85bbdb..c7ed9fb7 100644 --- a/src/google/protobuf/api.pb.cc +++ b/src/google/protobuf/api.pb.cc @@ -121,8 +121,11 @@ void protobuf_RegisterTypes(const ::std::string&) { } // namespace void protobuf_ShutdownFile_google_2fprotobuf_2fapi_2eproto() { + Api::default_instance_.Shutdown(); delete Api_reflection_; + Method::default_instance_.Shutdown(); delete Method_reflection_; + Mixin::default_instance_.Shutdown(); delete Mixin_reflection_; } @@ -247,7 +250,9 @@ Api::~Api() { void Api::SharedDtor() { name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); version_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - delete source_context_; + if (this != &default_instance_.get()) { + delete source_context_; + } } void Api::SetCachedSize(int size) const { |