anchor.diff:  :toc: macro
   :toclevels: 2
   :icons: font
  -
  -++++
  -<!-- Global site tag (gtag.js) - Google Analytics -->
  -<script async src="https://www.googletagmanager.com/gtag/js?id=G-Q8RPHFQ8PY"></script>
  -<script>
  -  window.dataLayer = window.dataLayer || [];
  -  function gtag(){dataLayer.push(arguments);}
  -  gtag('js', new Date());
  -
  -  gtag('config', 'G-Q8RPHFQ8PY');
  -</script>
  -++++
   
   image:https://maven-badges.herokuapp.com/maven-central/net.openhft/chronicle-core/badge.svg[caption="",link=https://maven-badges.herokuapp.com/maven-central/net.openhft/chronicle-core]
   image:https://javadoc.io/badge2/net.openhft/chronicle-core/javadoc.svg[link="https://www.javadoc.io/doc/net.openhft/chronicle-core/latest/index.html"]
  
positive.code:         MyReferenceCounted rc = new MyReferenceCounted();
          rc.throwExceptionIfClosed();
  
   rc.closeable.close();
          try {
              rc.throwExceptionIfClosed();
  
   fail();
          } catch (IllegalStateException ignored) {
  
          }
  
negative.code: 
          mc.throwExceptionIfClosed();
  
          mc.close();
          assertTrue(mc.isClosed());
          assertEquals(1, mc.performClose);
  
  