<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tyru</author_name>
  <author_url>https://blog.hatena.ne.jp/tyru/</author_url>
  <blog_title>Humanity</blog_title>
  <blog_url>https://tyru.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>(※この記事は Enter Password からの記事です) すげー恥ずかしい勘違いをしていた。 ある人の「でもほら、close()とか忘れちゃうでしょ？」っていう言葉を聞いてやっと分かった。 RAIIは終了処理を意識しないで済む技法で、 finallyで代用できるものじゃないことを知った。 わざわざstream系のクラスのオブジェクトを作るたびに手動でfinally書かなきゃいけない、というのはめんどくさすぎる。 以前は「RAIIとかクラス作るのがめんどくさい」とか言ってたんだけど、とんでもない勘違い。 やはりデストラクタとかscope-guard的な機能がない言語はつらい。 IDEでcl…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftyru.hatenablog.com%2Fentry%2F20110702%2Fraii_vs_finally&quot; title=&quot;RAII vs. finally - Humanity&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2011-07-02 00:00:01</published>
  <title>RAII vs. finally</title>
  <type>rich</type>
  <url>https://tyru.hatenablog.com/entry/20110702/raii_vs_finally</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
