Fix final leak (win32 only).
This commit is contained in:
parent
1fb3d394e5
commit
b43727981c
@ -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;
|
||||
|
@ -87,6 +87,7 @@ struct GoogleOnceInternal;
|
||||
|
||||
struct LIBPROTOBUF_EXPORT GoogleOnceType {
|
||||
GoogleOnceType();
|
||||
~GoogleOnceType();
|
||||
void Init(void (*init_func)());
|
||||
|
||||
volatile bool initialized_;
|
||||
|
Loading…
Reference in New Issue
Block a user