Allocated memory MUST be though shared_ptr or unique_ptr.