I want to talk about your #3 in the example above. Highlighted.
You seem be saying to just instantiate each of the three objects required for the doggerel call and pass them without checking for their validity. Let the called function do the checking.
That’s wrong for several reasons. One, these objects may be fundamental to operation and are instantiated on many code paths. They may fail for a variety of reasons. At the call point those failure reasons are available; once your’re inside the called function all you have is NULL or not-NULL.
My non-ER case has failure-specific messaging. Yeah I left out error codes,. I told you it was pseudocode from the beginning.
Their scopes define their lifetimes, and and clearly laid out. Try it