Beispiel #1
0
 protected override void OnReInit()
 {
     _entityId2Entity = EntityMap.Allocate();
     _cache           = EntityMapCache.Allocate(_entityId2Entity);
     SnapshotSeq      = 0;
     ServerTime       = 0;
 }
Beispiel #2
0
        public static EntityMapCache Allocate(EntityMap entityId2Entity)
        {
            EntityMapCache cache = ObjectAllocatorHolder <EntityMapCache> .Allocate();

            cache.SetEntityMap(entityId2Entity);
            return(cache);
        }
Beispiel #3
0
        protected void CleanUp()
        {
            _entityId2Entity.ReleaseReference();
            _entityId2Entity = null;


            _cache.InvalidCache();
            EntityMapCache.Free(_cache);
            _cache = null;
        }
Beispiel #4
0
 public static void Free(EntityMapCache cache)
 {
     ObjectAllocatorHolder <EntityMapCache> .Free(cache);
 }