<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Weakref on Nalar</title>
    <link>https://nalar.dev/tags/weakref/</link>
    <description>Recent content in Weakref on Nalar</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Wed, 02 Sep 2026 00:00:00 +0700</lastBuildDate>
    <atom:link href="https://nalar.dev/tags/weakref/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Weak References in Python: Caches, Object Lifetimes, and Cleanup</title>
      <link>https://nalar.dev/weak-references-in-python-caches-object-lifetimes-and-cleanup/</link>
      <pubDate>Wed, 02 Sep 2026 00:00:00 +0700</pubDate>
      <guid>https://nalar.dev/weak-references-in-python-caches-object-lifetimes-and-cleanup/</guid>
      <description>&lt;p&gt;A normal Python reference keeps an object alive. That is usually exactly what you want: if a dictionary contains an object, the object should remain available while the dictionary needs it.&lt;/p&gt;&#xA;&lt;p&gt;Some infrastructure has a different requirement. A cache, registry, or metadata table may want to refer to an object without becoming the reason that object stays alive forever. Python&amp;rsquo;s &lt;code&gt;weakref&lt;/code&gt; module provides references and containers for that ownership model.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
