When would this actually be necessary? Realistically, I see two possibilities.
1 - The function's purpose is to generate a result value, meaning that ignoring the result is a waste of a function call and any resources consumed by the function. In this case, though, nobody would ever be calling the function unless they specifically wanted the result.
2 - The caller must take ownership of the result. In this case, just don't return raw pointers.
The addition of [[nodiscard]] suggests that there are valid reasons, but I have never personally come across one.