Base——Singleton类

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/zxt_1/article/details/89855386
1.一个公有函数instance(),其余为私有pthread_once():intpthread_once(pthread_once_t*once_control, void(*init_routine)(void)); 保证init_routine指向的函数只执行一次init()函数定义如下:atexit(...
1.一个公有函数instance(),其余为私有 pthread_once(): int pthread_once(pthread_once_t *once_control, void (*init_routine)(void)); 保证init_routine指向的函数只执行一次 init()函数定义如下: atexit(

猜你喜欢

转载自blog.csdn.net/zxt_1/article/details/89855386
今日推荐