No, they do not mean the same. In the first example, the file is automatically closed after the block was processed. In the second example, it’s your responsibility to manually call newFile.close
.
No, they do not mean the same. In the first example, the file is automatically closed after the block was processed. In the second example, it’s your responsibility to manually call newFile.close
.