Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
b4372798
Commit
b4372798
authored
May 18, 2009
by
kenton@google.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix final leak (win32 only).
parent
1fb3d394
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
once.cc
src/google/protobuf/stubs/once.cc
+6
-0
once.h
src/google/protobuf/stubs/once.h
+1
-0
No files found.
src/google/protobuf/stubs/once.cc
View file @
b4372798
...
...
@@ -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
;
...
...
src/google/protobuf/stubs/once.h
View file @
b4372798
...
...
@@ -87,6 +87,7 @@ struct GoogleOnceInternal;
struct
LIBPROTOBUF_EXPORT
GoogleOnceType
{
GoogleOnceType
();
~
GoogleOnceType
();
void
Init
(
void
(
*
init_func
)());
volatile
bool
initialized_
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment