Yes, it would. But the caller is free to put a pointer in the derived class, if data duplication matters, or the data must be shared.
I also thought about the move_alloc, which is indeed a cool way of expressing “ownership” in Fortran. But I am not sure, whether users will appreciate the extra effort of allocation… ![]()