diff options
Diffstat (limited to 'src/google/protobuf/extension_set.cc')
-rw-r--r-- | src/google/protobuf/extension_set.cc | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/google/protobuf/extension_set.cc b/src/google/protobuf/extension_set.cc index 81ff89f..274554b 100644 --- a/src/google/protobuf/extension_set.cc +++ b/src/google/protobuf/extension_set.cc @@ -1,6 +1,6 @@ // Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ +// https://developers.google.com/protocol-buffers/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -1621,6 +1621,7 @@ PROTOBUF_DEFINE_DEFAULT_REPEATED(bool) struct StaticDefaultRepeatedFieldsInitializer { StaticDefaultRepeatedFieldsInitializer() { InitializeDefaultRepeatedFields(); + OnShutdown(&DestroyDefaultRepeatedFields); } } static_repeated_fields_initializer; @@ -1645,6 +1646,18 @@ void InitializeDefaultRepeatedFields() { new RepeatedField<bool>; } +void DestroyDefaultRepeatedFields() { + delete RepeatedStringTypeTraits::default_repeated_field_; + delete RepeatedMessageGenericTypeTraits::default_repeated_field_; + delete RepeatedPrimitiveGenericTypeTraits::default_repeated_field_int32_; + delete RepeatedPrimitiveGenericTypeTraits::default_repeated_field_int64_; + delete RepeatedPrimitiveGenericTypeTraits::default_repeated_field_uint32_; + delete RepeatedPrimitiveGenericTypeTraits::default_repeated_field_uint64_; + delete RepeatedPrimitiveGenericTypeTraits::default_repeated_field_double_; + delete RepeatedPrimitiveGenericTypeTraits::default_repeated_field_float_; + delete RepeatedPrimitiveGenericTypeTraits::default_repeated_field_bool_; +} + } // namespace internal } // namespace protobuf } // namespace google |