>Janet</code></td></tr></table><h2 id="Scratch-Memory-0">Scratch Memory
</h2>
<p>Panicking is implemented with C's <code class="mendoza-code">setjmp</code> and <code class="mendoza-code">longjmp</code>, which means that resources are not
cleaned up when a panic happens. To avoid leaking memory, stick to using Janet's data structures, which
are garbage collected, or
use Janet's scratch memory API to allocate memory. The scratch memory API exposes functions similar to <code class="mendoza-code">malloc</code> 