#pragma once#include "MemoryPool.h"#include "Types.h"templateclass ObjectPool {public: template static Type* Pop(Args&&... args) { Type* memory = reinterpret_cast(MemoryHeader::AttachHeader(s_pool.Pop(), s_allocSize)); new(memory)Type(std::forward(args)...); return memory; } static void Push(Type* ptr) { ptr->~Type(); s_pool.Push(MemoryHeader::DetachHeader(ptr)); } template static shared_pt..