@limitingfactor
> if it's correct
It depends on your intentions. Here depth will be destroyed when its TriangleGradients owner is no more. The pros are that you don't have to free the make_unique'd data on your own, the cons are that no other state will be able to keep its direct copy of depth, only accessing by a reference
> if it's correct
It depends on your intentions. Here depth will be destroyed when its TriangleGradients owner is no more. The pros are that you don't have to free the make_unique'd data on your own, the cons are that no other state will be able to keep its direct copy of depth, only accessing by a reference