X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class.git;a=blobdiff_plain;f=t%2F52leaks.t;h=79f6a1c3d289003bc5337d951e50577b3cb96117;hp=792c3d331ef06eceb93bfe5ebc7bc689b6f5b6a8;hb=37aafa2ede65e38af8fe9eda374ad4626290932f;hpb=0ac0af6c62637a5fdb06ecfb8ba4b60f93bf9d75 diff --git a/t/52leaks.t b/t/52leaks.t index 792c3d3..79f6a1c 100644 --- a/t/52leaks.t +++ b/t/52leaks.t @@ -128,6 +128,10 @@ unless (DBICTest::RunMode->is_plain) { resultset => $rs, + # twice so that we make sure only one H::M object spawned + chained_resultset => $rs->search_rs ({}, { '+columns' => [ 'foo' ] } ), + chained_resultset2 => $rs->search_rs ({}, { '+columns' => [ 'bar' ] } ), + row_object => $row_obj, result_source => $rs->result_source, @@ -165,7 +169,7 @@ for my $slot (keys %$weak_registry) { delete $weak_registry->{$slot}; } elsif ($slot =~ /^\QHash::Merge/) { - # only clear one object - more would indicate trouble + # only clear one object of a specific behavior - more would indicate trouble delete $weak_registry->{$slot} unless $cleared->{hash_merge_singleton}{$weak_registry->{$slot}{weakref}{behavior}}++; }