Пример #1
0
        public static CacheEntityMap Allocate(bool ownEntity = true)
        {
            CacheEntityMap rc = ObjectAllocatorHolder <CacheEntityMap> .Allocate();

            rc._ownEntity  = ownEntity;
            rc._arrayDirty = true;
            return(rc);
        }
Пример #2
0
 public void Init()
 {
     if (ownedMap == null)
     {
         ownedMap = CacheEntityMap.Allocate(false);
         Init(ownedMap);
     }
 }
Пример #3
0
        private void Init(CacheEntityMap map)
        {
            foreach (var entity in OriginEntityMap.Values)
            {
                CacheEntity(entity);
            }

            Initialized = true;
        }
Пример #4
0
        public void Clear()
        {
            if (ownedMap != null)
            {
                ownedMap.ReleaseReference();
                ownedMap = null;
            }

            Initialized = false;
        }