title: Does Perl 6 automatically call any special methods when it cleans up an object?
body: <p>I thought that Rakudo got finalizer support several years ago but I couldn't find the documentation for it (maybe it goes in <a href="https://docs.perl6.org/language/classtut" rel="noreferrer">Classes and Objects</a>). Listing all the methods in a class didn't seem like the thing I was looking for.</p>
  
  <pre><code>class Butterfly {
      method DESTROY { put "Destroyed" }
      # submethod DESTROY { put "Destroyed" }
      }
  {
  Butterfly.new;
  }
  </code></pre>
  
  <p>Maybe the problem is <a href="https://rt.perl.org/Ticket/Display.html?id=127243" rel="noreferrer">#127243: [RFC] DESTROY is not called on interpreter exit</a></p>
  
  <p>Ah, and marked as "to do" in <a href="https://github.com/perl6/roast/blob/d1baf2e7a3e56cd6619c46040d04ed6daebc1d02/S12-construction/destruction.t" rel="noreferrer">roast/S12-construction/destruction.t</a>. </p>