示例#1
0
        /// <summary>
        /// 分配一个对象
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static VarBytes Alloc(byte[] value)
        {
            //要从对象池获取
            VarBytes var = Alloc();

            var.Value = value;
            return(var);
        }
示例#2
0
        public static VarBytes Alloc()
        {
            //要从对象池获取
            VarBytes var = GameEntry.Pool.DequeueVarObject <VarBytes>();

            var.Value = default(byte[]);
            var.Retain();
            return(var);
        }