Exemplo n.º 1
0
        //原型模式:解决对象重复创建的问题
        //通过MemberwiseClone来clone新对象,避免重复创建
        public static Singleton CreateInstancePrototype()
        {
            Singleton singleton = (Singleton)_Singleton.MemberwiseClone();

            return(singleton);
        }