use LibXML;
my $string = q:to<__DATA__>;
<AAA>
<BBB></BBB>
</AAA>
__DATA__
my $xml = LibXML.parse: :$string;
for 1 .. 1000 {
.<BBB> given $xml.findnodes('//BBB');
}
produces errors on GC
src/xml6_node.c:21 0x5614aed42b40 type=1 name='BBB'
src/xml6_ref.c:93: node 0x5614aed42b40 was not referenced
src/xml6_node.c:21 0x5614aed42b40 type=1 name='BBB'
src/xml6_ref.c:93: node 0x5614aed42b40 was not referenced
src/xml6_node.c:21 0x5614aed42b40 type=1 name='BBB'
src/xml6_ref.c:93: node 0x5614aed42b40 was not referenced
src/xml6_node.c:21 0x5614aed42b40 type=1 name='BBB'
src/xml6_ref.c:93: node 0x5614aed42b40 was not referenced
src/xml6_node.c:21 0x5614aed42b40 type=1 name='BBB'
src/xml6_ref.c:93: node 0x5614aed42b40 was not referenced
... etc
produces errors on GC