title: iOS: How can I destroy a Singleton in ARC? Should I?
body: <p>I have a singleton class that accumulates data until that data is written to my database (if you want to know why I'm implementing things this way, see <a href="https://stackoverflow.com/questions/13078413/ios-passing-accumulating-data-down-a-long-chain-of-uiviewcontrollers">here</a>). After saving the data, I would like to destroy the singleton. How can I do this in ARC? Or am I being paranoid and do I need to destroy it at all?</p>
  
  <p>*You might say that this is a duplicate of <a href="https://stackoverflow.com/questions/10064238/how-to-ensure-destruction-of-singleton-in-ios-5-with-arc">this</a> question, but the accepted answer here is not specific enough to be helpful. It says <em>"You can declare a method/function you call explicitly."</em> What might the code for this look like? If I can't release the object outside a method, how can I possibly pull it off inside a method? It also says "<em>The simplest way is to have a static C++ class hold it, then release it in its destructor</em>." I don't know C++, but - can you really put a C++ class in your app code? </p>
  
  <p>My singleton is implemented like so:</p>
  
  <pre><code>+(NHCFamilyStatus *)familyStatus
  {
    static dispatch_once_t pred;
    static NHCFamilyStatus *familyStatusSharedObject=nil;
  
      dispatch_once(&amp;pred, ^
      {
          familyStatusSharedObject = [[NHCFamilyStatus alloc] init];
      });
  
    return familyStatusSharedObject;
  }
  </code></pre>