First & foremost is to try & get the documentation. One cannot be 100% sure unless the API documents the behavior. If all attempts fail then it is reasonable to assume that:
- Function does not modify either
Key
orValue
since they are passed asconst
. - Unless explicitly mentioned the caller retains the ownership of the variables being passed to the function and can do whatever they want with the passed
Key
andValue
after the function call.
Also, One should confirm the assumptions with rigorous testing.