PageRenderTime 28ms CodeModel.GetById 20ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/llcommon/llcommon.cpp

https://bitbucket.org/lindenlab/viewer-beta/
C++ | 64 lines | 27 code | 6 blank | 31 comment | 2 complexity | c78a26a08db8e5d21fe0db93d84bae77 MD5 | raw file
 1/** 
 2 * @file llcommon.cpp
 3 *
 4 * $LicenseInfo:firstyear=2006&license=viewerlgpl$
 5 * Second Life Viewer Source Code
 6 * Copyright (C) 2010, Linden Research, Inc.
 7 * 
 8 * This library is free software; you can redistribute it and/or
 9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation;
11 * version 2.1 of the License only.
12 * 
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 * Lesser General Public License for more details.
17 * 
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
21 * 
22 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
23 * $/LicenseInfo$
24 */
25
26#include "linden_common.h"
27
28#include "llcommon.h"
29
30#include "llmemory.h"
31#include "llthread.h"
32
33//static
34BOOL LLCommon::sAprInitialized = FALSE;
35
36//static
37void LLCommon::initClass()
38{
39	LLMemory::initClass();
40	if (!sAprInitialized)
41	{
42		ll_init_apr();
43		sAprInitialized = TRUE;
44	}
45	LLTimer::initClass();
46	LLThreadSafeRefCount::initThreadSafeRefCount();
47// 	LLWorkerThread::initClass();
48// 	LLFrameCallbackManager::initClass();
49}
50
51//static
52void LLCommon::cleanupClass()
53{
54// 	LLFrameCallbackManager::cleanupClass();
55// 	LLWorkerThread::cleanupClass();
56	LLThreadSafeRefCount::cleanupThreadSafeRefCount();
57	LLTimer::cleanupClass();
58	if (sAprInitialized)
59	{
60		ll_cleanup_apr();
61		sAprInitialized = FALSE;
62	}
63	LLMemory::cleanupClass();
64}