In the text "the destructor cleans up file.file_pointer for you ➋" it appears that the reference to "(2)" in the code snippet should actually be "(3)" instead. The destructor is called at the end of the scope (which is at location 3 in the code), not at the file initialization (which is at location 2 in the code).
The way you wrote it is probably not what you actually intended, I'm guessing.