Memory allocator wihout caching.
This always creates a new instance of Memory with allocation (Memory::alloc), and frees when it's returned.
MemoryType -- A Memory class implementation such as CpuMemory and CudaMemory.