Always Be Closing: The Tale of a Go Resource Leak
medium.com
medium.com
Murhpy's law. People are generally unreliable to ensure and maintain this kind of consistency. If every call to "A" requires a call to "B", try to offer an abstraction (sorry, bad choice of words)... a pragmatic way to deal with the whole "AB" thing as a single step, especially if you can do it in the same lexical scope (RAII, try-with, etc.).