I noticed in the test code a comment that says “the leak doesn’t happen if you call it via a function call instead of inline”. This observation matches what we found in 75794, which is that objects created in a loop inside a function that go out of scope aren’t necessarily released from memory until the local scope ends (i.e., at the end of a method call).