Assume I have some C++ method which returns back a pointer to an object. Something in the header file that looks like this:
uint8_t* getData(void);
This guy returns a byte array, but there is nothing that says if this is a dynamic or statically generated piece of data (local to the class or created with new).
Is there a specific naming convention in C++ to distinguish between methods that return memory that is dynamically allocated (and so must be deleted by the requester), vs methods that just return a reference to a statically define piece of data?
What is the preferred way to do this, or does it depend on the situation?