aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/stubs/once.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/stubs/once.cc')
-rw-r--r--src/google/protobuf/stubs/once.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/google/protobuf/stubs/once.cc b/src/google/protobuf/stubs/once.cc
index b47a031c..3c53bcd7 100644
--- a/src/google/protobuf/stubs/once.cc
+++ b/src/google/protobuf/stubs/once.cc
@@ -56,6 +56,12 @@ struct GoogleOnceInternal {
CRITICAL_SECTION critical_section;
};
+GoogleOnceType::~GoogleOnceType()
+{
+ delete internal_;
+ internal_ = NULL;
+}
+
GoogleOnceType::GoogleOnceType() {
// internal_ may be non-NULL if Init() was already called.
if (internal_ == NULL) internal_ = new GoogleOnceInternal;