title: What are the real world applications of the singleton pattern?
body: <h3>Duplicate</h3>
  <p><a href="https://stackoverflow.com/questions/228164/on-design-patterns-when-to-use-the-singleton">On design patterns: When should I use the singleton?</a></p>
  <pre><code>class Singleton
  {
      private static Singleton instance;
  
      private Singleton() {}
  
      public static Singleton Instance
      {
          get
          {
              if (instance == null)
                  instance = new Singleton();
  
              return instance;
          }
      }
  }
  </code></pre>