I've been trying to understand ownership and from what I've gathered it's just a responsibility for managing lifetime. but I am a little confused when working with raw/smart pointers and references.
For example if I return something as some form of pointer the ownership now belongs to the caller? (I assume there's an exception to shared_ptr since it's shared) Meanwhile a reference would just imply that the caller is using it, but doesn't actually own it and therefore doesn't need to worry about managing its lifetime?