singleton.h
#pragma once
#include <mutex>
//懒汉模式
/*懒汉式单例模式是用时间换取空间,饿汉式单例模式是用空间换取时间。
饿汉式:单例对象无论用或不用,程序启动即创建;
懒汉式:单例对象在用的时候再创建,不用即销毁。*/
template <typename T>
class Singleton
{
public:
static T* Instance()
{
if (_instance == nullptr)
{<