I had a problem when I was using a custom allocator that was not happy with memcpying nullptr even when the size is 0.
memcpy
nullptr