aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/basetypes/MCNull.cpp
blob: 53d50622b77bced46c4db276ebf05182e20a699d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//
//  MCNull.cpp
//  hermes
//
//  Created by DINH Viêt Hoà on 4/9/13.
//  Copyright (c) 2013 MailCore. All rights reserved.
//

#include "MCNull.h"

using namespace mailcore;

static Null * s_null = NULL;
static pthread_once_t s_once;

static void init_null(void)
{
    s_null = new Null();
}

Null * Null::null()
{
    pthread_once(&s_once, init_null);
    return s_null;
}