<div dir="ltr">I understand. However, CloseableCollection is not part of the JDK. It is in a separate library that is probably brand new. It probably is used only by a handful of projects at this time.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Dec 29, 2022 at 2:28 AM Mark Raynsford <<a href="mailto:org.openjdk@io7m.com">org.openjdk@io7m.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 2022-12-28T12:15:03 -0800<br>
Nathan Reynolds <<a href="mailto:numeralnathan@gmail.com" target="_blank">numeralnathan@gmail.com</a>> wrote:<br>
<br>
> CloseableCollection is a class of the library. It won't show up in heap<br>
> dumps because probably very few people are using it. You would need to<br>
> look at JIT optimized assembly to see if JIT is eliding the<br>
> CloseableCollection and it's internal data structure (array?).<br>
<br>
To be clear, I'm referring to the heap sampling feature of tools like<br>
VisualVM:<br>
<br>
<a href="https://herongyang.com/Java-Tools/jvisualvm-Heap-Dump-Class-List.jpg" rel="noreferrer" target="_blank">https://herongyang.com/Java-Tools/jvisualvm-Heap-Dump-Class-List.jpg</a><br>
<br>
The CloseableCollection will show up even if there's only a single<br>
instance. The internal array of the ArrayDeque does get mixed into the<br>
samples for Object[], though.<br>
<br>
-- <br>
Mark Raynsford | <a href="https://www.io7m.com" rel="noreferrer" target="_blank">https://www.io7m.com</a><br>
<br>
</blockquote></div>