<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>ARC on Andrew Bancroft</title>
    <link>https://www.andrewcbancroft.com/tags/arc/</link>
    <description>Recent content about iOS development with Swift in ARC  from Andrew Bancroft.</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Fri, 08 May 2015 18:01:09 +0000</lastBuildDate>
    
        <atom:link href="https://www.andrewcbancroft.com/tags/arc/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>Strong, Weak, and Unowned – Sorting out ARC and Swift</title>
      <link>https://www.andrewcbancroft.com/2015/05/08/strong-weak-and-unowned-sorting-out-arc-and-swift/</link>
      <pubDate>Fri, 08 May 2015 18:01:09 +0000</pubDate>
      
      <guid>https://www.andrewcbancroft.com/2015/05/08/strong-weak-and-unowned-sorting-out-arc-and-swift/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m willing to bet that a good number of Swift developers struggle with the particulars of how &lt;code&gt;strong&lt;/code&gt;, &lt;code&gt;weak&lt;/code&gt;, and &lt;code&gt;unowned&lt;/code&gt; affect the run-time behavior of their code. I, myself, wouldn&amp;rsquo;t want to have to give an explanation of the finer points of Automatic Reference Counting (ARC) if my life depended on it.&lt;/p&gt;
&lt;p&gt;I wanted to stop being unsure about the implications of typing one of those three words before variable / constant declarations, so I finally pulled up the &lt;a href=&#34;https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/AutomaticReferenceCounting.html&#34;&gt;Apple Documentation on ARC&lt;/a&gt; and began trying to digest the semantics. This article is an attempt to share what got sorted out in my brain as it regards ARC and Swift.&lt;/p&gt;
&lt;p&gt;This article is long enough that I thought, &amp;ldquo;Why don&amp;rsquo;t I summarize my conclusions up front and then let folks read about how I got there if they so-desire”. So here you go: Conclusions first!&lt;/p&gt;
&lt;h3 id=&#34;conclusions&#34;&gt;Conclusions&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;To determine if you even need to worry about &lt;code&gt;strong&lt;/code&gt;, &lt;code&gt;weak&lt;/code&gt;, or &lt;code&gt;unowned&lt;/code&gt;, ask, &amp;ldquo;Am I dealing with &lt;em&gt;reference&lt;/em&gt; types”. If you&amp;rsquo;re working with Structs or Enums, ARC isn&amp;rsquo;t managing the memory for those Types and you don&amp;rsquo;t even need to worry about specifying &lt;code&gt;weak&lt;/code&gt; or &lt;code&gt;unowned&lt;/code&gt; for those constants or variables.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Strong&lt;/code&gt; references are fine in hierarchical relationships where the parent references the child, but not vice-versa. In fact, &lt;code&gt;strong&lt;/code&gt; references are the most appropraite kind of reference most of the time.&lt;/li&gt;
&lt;li&gt;When two instances are &lt;em&gt;optionally&lt;/em&gt; related to one another, make sure that one of those instances holds a &lt;code&gt;weak&lt;/code&gt; reference to the other.&lt;/li&gt;
&lt;li&gt;When two instances are related in such a way that one of the instances can&amp;rsquo;t exist without the other, the instance with the mandatory dependency needs to hold an &lt;code&gt;unowned&lt;/code&gt; reference to the other instance.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To see how I arrived at this set of conclusions, read on or jump around!&lt;/p&gt;
&lt;p&gt;&lt;a name=&#34;arc-and-memory-management&#34; class=&#34;jump-target&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;arc-and-memory-management&#34;&gt;ARC and memory management&lt;/h3&gt;
&lt;p&gt;For many, much of &amp;ldquo;memory management” feels like a huge black box.&lt;/p&gt;
&lt;p&gt;The mystical nature of memory management is exaggerated by the fact that many of the languages we&amp;rsquo;re familiar with abstract it away. For the most part, we can simply write code and not think too hard about the number of bytes our object instances are using or how they get cleaned up when they&amp;rsquo;re done being used. It just works.&lt;/p&gt;
&lt;p&gt;Automatic Reference Counting (ARC) is one of those abstractions over managing memory. It&amp;rsquo;s the methodology Apple employs to free up memory when class instances are finished using it.&lt;/p&gt;
&lt;p&gt;ARC &lt;em&gt;only&lt;/em&gt; applies to classes (so not structs or enums), because Automatic &lt;em&gt;Reference&lt;/em&gt; Counting applies only to &lt;em&gt;reference Types&lt;/em&gt;. Structs &amp;amp; enums are &lt;em&gt;value&lt;/em&gt; Types, so ARC does not manage the memory associated with instances of those Types.&lt;/p&gt;
&lt;p&gt;The question that begins the discussion of our featured keywords is, &amp;ldquo;How does ARC know when an instance is &amp;ldquo;finished using” the memory it borrowed?”&lt;/p&gt;
&lt;p&gt;&lt;a name=&#34;strong-references&#34; class=&#34;jump-target&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;strong-references&#34;&gt;Strong references&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;Strong&lt;/code&gt;, &lt;code&gt;weak&lt;/code&gt;, and &lt;code&gt;unowned&lt;/code&gt; are keywords that describe the nature of a reference in the ARC paradigm.&lt;/p&gt;
&lt;p&gt;All references are &lt;code&gt;strong&lt;/code&gt; references by default unless otherwise specified. &lt;em&gt;Most&lt;/em&gt; of the time, this is the right thing to do. &lt;code&gt;Strong&lt;/code&gt; is always implied when you declare a variable or constant. You don&amp;rsquo;t need to type &lt;code&gt;strong&lt;/code&gt; in Swift.&lt;/p&gt;
&lt;p&gt;So what does the &amp;ldquo;strength” of a reference have to do with how ARC manages memory?&lt;/p&gt;
&lt;p&gt;ARC doesn&amp;rsquo;t free up the memory being used by a class instance until &lt;em&gt;all&lt;/em&gt; &lt;code&gt;strong&lt;/code&gt; references to that instance are broken. How are &lt;code&gt;strong&lt;/code&gt; references broken?&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Strong&lt;/code&gt; references can be broken…&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;When a variable that references an instance of something is set to &lt;code&gt;nil&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;When a parent variable that holds a reference to a child class instance is to &lt;code&gt;nil&lt;/code&gt; it will break the reference to the parent &lt;em&gt;and&lt;/em&gt; the child&lt;/li&gt;
&lt;li&gt;When a variable or constant goes out of scope – for example, if something gets initialized inside a control-flow code segment like an &lt;code&gt;if&lt;/code&gt;/&lt;code&gt;else&lt;/code&gt; or inside a &lt;code&gt;for&lt;/code&gt; loop, when execution moves past that code segment, the reference is broken and the memory is freed by ARC&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Everything in ARC&amp;rsquo;s memory management model hinges on the number of &lt;code&gt;strong&lt;/code&gt; references are connected to an instance. The moment that the number of &lt;code&gt;strong&lt;/code&gt; references counts down to zero, the memory where that instance was stored is freed.&lt;/p&gt;
&lt;p&gt;So where does &lt;code&gt;weak&lt;/code&gt; and &lt;code&gt;unowned&lt;/code&gt; come in?&lt;/p&gt;
&lt;p&gt;&lt;a name=&#34;weak-unowned-references&#34; class=&#34;jump-target&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;weak-and-unowned-references&#34;&gt;Weak and unowned references&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;Weak&lt;/code&gt; and &lt;code&gt;unowned&lt;/code&gt; references come into the picture when we start talking about the relationships that emerge between class instances.&lt;/p&gt;
&lt;p&gt;&lt;a name=&#34;relationships-between-instances&#34; class=&#34;jump-target&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4 id=&#34;relationships-between-instances&#34;&gt;Relationships between instances&lt;/h4&gt;
&lt;p&gt;Relationships between classes are core to the Object-Oriented paradigm. Whether you plan them or not, these relationships exist, and they affect the ARC memory management model.&lt;/p&gt;
&lt;p&gt;So which kinds of relationships exist? Which ones warrant the use of &lt;code&gt;weak&lt;/code&gt; and &lt;code&gt;unowned&lt;/code&gt;?&lt;/p&gt;
&lt;p&gt;&lt;a name=&#34;hierarchical&#34; class=&#34;jump-target&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h5 id=&#34;hierarchical-relationships&#34;&gt;Hierarchical relationships&lt;/h5&gt;
&lt;p&gt;Much of our programming in Swift involves hierarchical relationships. Things are often modeled in such a way that one class instance holds &lt;code&gt;strong&lt;/code&gt; references to one or more child class instances, and those child class instances hold one or more &lt;code&gt;strong&lt;/code&gt; references to &lt;em&gt;other&lt;/em&gt; child class instances, and so on. The &lt;code&gt;strong&lt;/code&gt; reference relationship in this type of situation flows in one direction: from parent to child.&lt;/p&gt;
&lt;p&gt;In this arrangement, &lt;code&gt;strong&lt;/code&gt; references are normal and fine. But what happens if, say, a &lt;em&gt;child&lt;/em&gt; class were to hold a reference back to its &lt;em&gt;parent&lt;/em&gt;? This is where we can get into trouble with ARC.&lt;/p&gt;
&lt;p&gt;&lt;a name=&#34;optional-mutually-dependent&#34; class=&#34;jump-target&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h5 id=&#34;optional-mutually-dependent-relationships&#34;&gt;Optional, mutually dependent relationships&lt;/h5&gt;
&lt;p&gt;By the end of this section, my goal is to demonstrate the role of &lt;code&gt;weak&lt;/code&gt; references.&lt;/p&gt;
&lt;p&gt;When class instances depend on each other, that is, they both hold a reference to one another, it can be said that the instances are mutually dependent. Sometimes, the dependence isn&amp;rsquo;t required – in these cases, it makes sense for one instance to exist without a reference to the other, and vice-versa.&lt;/p&gt;
&lt;p&gt;If we were talking database cardinality, we might say that the relationship is 0:1 both ways.&lt;/p&gt;
&lt;p&gt;An example is always nice to have before us – This past week, a tornado hit a zoo here in Oklahoma, and a few exotic animals escaped, so the theme is on my mind.&lt;/p&gt;
&lt;p&gt;In a zoo, an &lt;code&gt;Animal&lt;/code&gt; lives in an &lt;code&gt;Exhibit&lt;/code&gt;. Sometimes &lt;code&gt;Exhibits&lt;/code&gt; may be vacant. They could be cleaning it, or the &lt;code&gt;Animal&lt;/code&gt; that lived there is sick or being moved, or a tornado hits it, etc.&lt;/p&gt;
&lt;p&gt;Likewise, an &lt;code&gt;Animal&lt;/code&gt; may not live in an &lt;code&gt;Exhibit&lt;/code&gt;. It could be held in a temporary location while its &lt;code&gt;Exhibit&lt;/code&gt; is being cleaned, or be in the process of being treated or transferred to another location, or it could have escaped the zoo due to a tornado, etc.&lt;/p&gt;
&lt;p&gt;We could model this example as follows:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-swift&#34; data-lang=&#34;swift&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 1&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;Animal&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 2&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;let&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;String&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 3&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;let&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;species&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;String&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 4&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;init&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;String&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;species&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;String&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 5&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;kc&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;name&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;name&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 6&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;kc&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;species&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;species&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 7&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 8&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 9&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;exhibit&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Exhibit&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;?&lt;/span&gt;  &lt;span class=&#34;c1&#34;&gt;// notice the optional nature of exhibit&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;11&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;Exhibit&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;13&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;let&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;title&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;String&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;14&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;init&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;title&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;String&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;title&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;title&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;15&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;16&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;animal&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Animal&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;?&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;// notice the optional nature of animal&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;17&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Let&amp;rsquo;s consider the situation where an &lt;code&gt;Animal&lt;/code&gt; &lt;em&gt;is&lt;/em&gt; living in an &lt;code&gt;Exhibit&lt;/code&gt;. It might be nice to traverse a relationship between them to get information about one or the other. So as we instantiate an &lt;code&gt;Animal&lt;/code&gt; and an &lt;code&gt;Exhibit&lt;/code&gt;, the next immediate step would be to assign the instances to each other&amp;rsquo;s corresponding property.&lt;/p&gt;
&lt;p&gt;Now consider the situation that happened this week – a tornado hits the zoo and the &lt;code&gt;Animal&lt;/code&gt; escapes from its &lt;code&gt;Exhibit&lt;/code&gt;. Say that &lt;em&gt;unlike&lt;/em&gt; this week, the &lt;code&gt;Animal&lt;/code&gt; isn&amp;rsquo;t recovered (they actually got the animals that escaped back). Suppose that it roams the plains of Oklahoma in freedom. The zoo, in turn, has to close the &lt;code&gt;Exhibit&lt;/code&gt;. To model this, we may simply set the &lt;code&gt;Animal&lt;/code&gt; instance to nil and the &lt;code&gt;Exhibit&lt;/code&gt; instance to nil.&lt;/p&gt;
&lt;p&gt;&lt;a name=&#34;memory-leak-warning&#34; class=&#34;jump-target&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h6 id=&#34;memory-leak-warning&#34;&gt;Memory leak warning&lt;/h6&gt;
&lt;p&gt;The example just given is one that shows how it is possible to create a memory leak in your application. How?&lt;/p&gt;
&lt;p&gt;It all has to do with ARC – remember that it &lt;em&gt;only&lt;/em&gt; frees up memory for a class instance when there are &lt;em&gt;zero&lt;/em&gt; references to it.&lt;/p&gt;
&lt;p&gt;In our &lt;code&gt;Animal&lt;/code&gt; – &lt;code&gt;Exhibit&lt;/code&gt; example, both instances referenced &lt;em&gt;each other&lt;/em&gt;. When we set the &lt;code&gt;Animal&lt;/code&gt; instance to nil, the &lt;code&gt;Exhibit&lt;/code&gt; instance still held a reference to it through its &lt;code&gt;animal&lt;/code&gt; property.&lt;/p&gt;
&lt;p&gt;In turn, since that &lt;code&gt;Animal&lt;/code&gt; instance is still around, it holds a reference to the &lt;code&gt;Exhibit&lt;/code&gt; instance through its &lt;code&gt;exhibit&lt;/code&gt; property. So when we set the &lt;code&gt;Exhibit&lt;/code&gt; instance to nil, the &lt;code&gt;Animal&lt;/code&gt; still holds on to it.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Now&lt;/em&gt; we have a dilemma. While the &lt;code&gt;Animal&lt;/code&gt; and the &lt;code&gt;Exhibit&lt;/code&gt; continue to reference each other (so neither instance&amp;rsquo;s memory can be freed), &lt;em&gt;nothing else does&lt;/em&gt; – there&amp;rsquo;s no way to access either instance any more. Thus, a memory leak is created.&lt;/p&gt;
&lt;p&gt;But there&amp;rsquo;s hope! In this &amp;ldquo;Optional, mutually dependent relationship” scenario, this is where the keyword &lt;code&gt;weak&lt;/code&gt; comes into play.&lt;/p&gt;
&lt;p&gt;&lt;a name=&#34;breaking-strong-reference-cycle&#34; class=&#34;jump-target&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h6 id=&#34;breaking-strong-reference-cycle&#34;&gt;Breaking strong reference cycle&lt;/h6&gt;
&lt;p&gt;The situation just described is what&amp;rsquo;s known as a &amp;ldquo;strong reference cycle”.&lt;/p&gt;
&lt;p&gt;Thankfully, there&amp;rsquo;s a way to break those cycles and avoid memory leaks.&lt;/p&gt;
&lt;p&gt;In the situation where that optional mutually dependent relationship exists, such as between an &lt;code&gt;Animal&lt;/code&gt; and an &lt;code&gt;Exhibit&lt;/code&gt;, changing one of those instances reference to the other from &lt;code&gt;strong&lt;/code&gt; to &lt;code&gt;weak&lt;/code&gt; will break the cycle.&lt;/p&gt;
&lt;p&gt;It doesn&amp;rsquo;t really matter which class holds the weak reference, just as long as one of them does.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-swift&#34; data-lang=&#34;swift&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 1&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;Animal&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 2&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;let&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;String&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 3&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;let&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;species&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;String&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 4&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;init&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;String&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;species&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;String&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 5&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;kc&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;name&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;name&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 6&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;kc&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;species&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;species&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 7&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 8&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 9&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;exhibit&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Exhibit&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;?&lt;/span&gt;  &lt;span class=&#34;c1&#34;&gt;// we&amp;#39;ll hold a strong reference to the exhibit&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;11&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;Exhibit&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;13&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;let&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;title&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;String&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;14&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;init&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;title&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;String&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;title&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;title&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;15&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;16&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kr&#34;&gt;weak&lt;/span&gt; &lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;animal&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Animal&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;?&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;// but notice - we&amp;#39;re holding a _weak_ reference to the animal&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;17&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Making the &lt;code&gt;Exhibit&#39;s&lt;/code&gt; &lt;code&gt;animal&lt;/code&gt; property hold a &lt;code&gt;weak&lt;/code&gt; reference to an &lt;code&gt;Animal&lt;/code&gt; instance eliminates the possibility of a strong reference cycle.&lt;/p&gt;
&lt;p&gt;So what about &lt;code&gt;unowned&lt;/code&gt;?&lt;/p&gt;
&lt;p&gt;&lt;a name=&#34;mandatory-one-way-dependent&#34; class=&#34;jump-target&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h5 id=&#34;mandatory-one-way-dependent-relationships&#34;&gt;Mandatory, one-way dependent relationships&lt;/h5&gt;
&lt;p&gt;By the end of this section, my goal is to demonstrate the role of &lt;code&gt;unowned&lt;/code&gt; references.&lt;/p&gt;
&lt;p&gt;There is one final category of relationship that pertains most immediately to the topic of ARC. There are times when two class instances are related to one another, but &lt;em&gt;one&lt;/em&gt; of those instance &lt;em&gt;cannot&lt;/em&gt; exist without the other.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s continue with the zoo theme. Suppose that our zoo issues &lt;code&gt;AnnualPasses&lt;/code&gt; to &lt;code&gt;Visitors&lt;/code&gt;. A &lt;code&gt;Visitor&lt;/code&gt; can come to the zoo &lt;em&gt;without&lt;/em&gt; an &lt;code&gt;AnnualPass&lt;/code&gt;, of course, and can thus exist on its own and happily enjoy the exhibits. An &lt;code&gt;AnnualPass&lt;/code&gt;, however, is &lt;em&gt;always&lt;/em&gt; issued to a &lt;code&gt;Visitor&lt;/code&gt; and cannot exist without being associated with one.&lt;/p&gt;
&lt;p&gt;To model this kind of relationship, we may define some classes as follows:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-swift&#34; data-lang=&#34;swift&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 1&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;Visitor&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 2&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;let&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;String&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 3&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;annualPass&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;AnnualPass&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;?&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 4&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;init&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;String&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 5&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;kc&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;name&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;name&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 6&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 7&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 8&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 9&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;AnnualPass&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;let&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;number&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;UInt64&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;11&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kr&#34;&gt;unowned&lt;/span&gt; &lt;span class=&#34;kd&#34;&gt;let&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;passholder&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Visitor&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;// notice the use of an _unowned_ reference&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;init&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;number&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;UInt64&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;passholder&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Visitor&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;13&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;kc&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;number&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;number&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;14&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;kc&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;passholder&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;passholder&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;15&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;16&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Notice a couple of things:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The &lt;code&gt;Visitor&lt;/code&gt; holds an optional &lt;code&gt;strong&lt;/code&gt; reference to an &lt;code&gt;AnnualPass&lt;/code&gt; instance&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;AnnualPass&lt;/code&gt; holds a &lt;em&gt;non&lt;/em&gt;-optional &lt;code&gt;unowned&lt;/code&gt; reference to a &lt;code&gt;Visitor&lt;/code&gt; instance&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Modeling things this way also eliminates the possibility of a strong reference cycle by allowing the &lt;code&gt;strong&lt;/code&gt; reference count to reach zero when a &lt;code&gt;Visitor&lt;/code&gt; variable is set to nil.&lt;/p&gt;
&lt;p&gt;&lt;a name=&#34;conclusions-2&#34; class=&#34;jump-target&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;conclusions-1&#34;&gt;Conclusions&lt;/h3&gt;
&lt;p&gt;I know I stated these at the beginning, but I&amp;rsquo;ll restate them here just for completeness…&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;To determine if you even need to worry about &lt;code&gt;strong&lt;/code&gt;, &lt;code&gt;weak&lt;/code&gt;, or &lt;code&gt;unowned&lt;/code&gt;, ask, &amp;ldquo;Am I dealing with &lt;em&gt;reference&lt;/em&gt; types”. If you&amp;rsquo;re working with Structs or Enums, ARC isn&amp;rsquo;t managing the memory for those Types and you don&amp;rsquo;t even need to worry about specifying &lt;code&gt;weak&lt;/code&gt; or &lt;code&gt;unowned&lt;/code&gt; for those constants or variables.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Strong&lt;/code&gt; references are fine in hierarchical relationships where the parent references the child, but not vice-versa. In fact, &lt;code&gt;strong&lt;/code&gt; references are the most appropraite kind of reference most of the time.&lt;/li&gt;
&lt;li&gt;When two instances are &lt;em&gt;optionally&lt;/em&gt; related to one another, make sure that one of those instances holds a &lt;code&gt;weak&lt;/code&gt; reference to the other.&lt;/li&gt;
&lt;li&gt;When two instances are related in such a way that one of the instances can&amp;rsquo;t exist without the other, the instance with the mandatory dependency needs to hold an &lt;code&gt;unowned&lt;/code&gt; reference to the other instance.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a name=&#34;share&#34; class=&#34;jump-target&#34;&gt;&lt;/a&gt;&lt;/p&gt;
</description>
    </item>
    
  </channel>
</rss>