<?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>
    <anon>Python</anon>
  </categories>
  <description>なんかgcネタが続いてしまうが、先日のPython Hack-a-thon で発表した中で、「ジェネレータオブジェクトが解放されない場合がある」というのは、あまり知られていないようだ。Python公式ドキュメントを確認してみると、どうやらこちらにも書かれていない。知らないとハマってしまう場合もあるので、もうちょっと詳しく解説しておこう。 ガベージコレクションで解放されないオブジェクト まず、ちょっと復習しておこう。Pythonのガベージコレクション機構では、__del__() メソッドを持ったオブジェクトで循環参照を作ってしまうと、そのオブジェクトは自動的には解放されなくなってしまう。例えば、…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fatsuoishimoto.hatenablog.com%2Fentry%2F20110227%2F1298817286&quot; title=&quot;Pythonの粗大ゴミ - 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>2011-02-27 23:34:46</published>
  <title>Pythonの粗大ゴミ</title>
  <type>rich</type>
  <url>https://atsuoishimoto.hatenablog.com/entry/20110227/1298817286</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
