Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

30 lines
558 B

// Copyright (c) 2002 Microsoft Corporation
//
// File: init.cpp
//
// Synopsis: Defines an initialization guard
// to ensure that all resources are freed
//
// History: 03/26/2002 JeffJon Created
#include "pch.h"
#include "init.h"
#include "state.h"
unsigned CYSInitializationGuard::counter = 0;
CYSInitializationGuard::CYSInitializationGuard()
{
counter++;
}
CYSInitializationGuard::~CYSInitializationGuard()
{
if (--counter == 0)
{
// cleanup the State
State::Destroy();
}
}