<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Weak References on Nalar</title>
    <link>https://nalar.dev/tags/weak-references/</link>
    <description>Recent content in Weak References on Nalar</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 03 Sep 2026 00:00:00 +0700</lastBuildDate>
    <atom:link href="https://nalar.dev/tags/weak-references/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Use Weak References for Non-Owning Object Relationships in Python</title>
      <link>https://nalar.dev/use-weak-references-for-non-owning-object-relationships-in-python/</link>
      <pubDate>Thu, 03 Sep 2026 00:00:00 +0700</pubDate>
      <guid>https://nalar.dev/use-weak-references-for-non-owning-object-relationships-in-python/</guid>
      <description>&lt;p&gt;Most Python code should use ordinary references. If one object stores another object in an attribute, list, or dictionary, that reference normally means the stored object should remain available for as long as the owner needs it.&lt;/p&gt;&#xA;&lt;p&gt;Some relationships are different. A cache may want to reuse an object &lt;strong&gt;only while another part of the program already owns it&lt;/strong&gt;. A registry may want to discover live objects without extending their lifetime. An observer table may want to remember listeners without becoming the reason those listeners can never be collected.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
