<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>atsuoishimoto</author_name>
  <author_url>https://blog.hatena.ne.jp/atsuoishimoto/</author_url>
  <blog_title>atsuoishimoto's diary</blog_title>
  <blog_url>https://atsuoishimoto.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>以前、ジェネレータが循環参照の一部になっている場合、メモリが開放されなくなるケースがあるという エントリ を書いた。 最近、この仕様が 問題となっていた ようで対策が検討されていたが、ついにトランクにコミットされたようだ。 http://bugs.python.org/issue17807 従来のジェネレータでは、ジェネレータオブジェクトへの参照が全て破棄されて不要となった時に GeneratorExit 例外を送出してコードの実行を再開し、ジェネレータ内の finally 節が実行されるようになっていた。Pythonのコードで書くと、こんな感じになる class Generator: def…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fatsuoishimoto.hatenablog.com%2Fentry%2F2016%2F04%2F10%2F145106&quot; title=&quot;ジェネレータの循環参照 - atsuoishimoto&amp;#39;s diary&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>2013-05-09 14:51:06</published>
  <title>ジェネレータの循環参照</title>
  <type>rich</type>
  <url>https://atsuoishimoto.hatenablog.com/entry/2016/04/10/145106</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
