static ObjectAllocatorHolder() { if (_allocator == null) { _allocator = ObjectAllocators.GetAllocator(typeof(T)); } }
public void SetTemplate(T template, IObjectAllocator <T> allocator) { Clear(); if (_template != null) { _allocator.Destroy(_template); } _template = template; _allocator = allocator; _allocator.SetTemplate(_template); }
public virtual void Reset() { IsDisposed = false; _allocator = null; }
public ObjectContainer(IObjectAllocator <TContaining, TObject> allocator) { _allocator = allocator; }
public static void SetAllocator(Type type, IObjectAllocator allocator) { _allocatorDic[type] = allocator; }
public void SetAllocator(IObjectAllocator <T> allocator) { Clear(); _allocator = allocator; }