2010/10/26 Dave Mitchell <davem@iabyn.com>: > On Tue, Oct 05, 2010 at 11:52:20PM -0700, Andreas J. Koenig via RT wrote: >> b2a2a9010bb3413ad9c32e455d93e01069d0fd73 >> Author: David Mitchell <davem@iabyn.com> >> Date: Mon Oct 4 15:18:44 2010 +0100 >> >> stop map,grep leaking temps [perl #48004] >> >> breaks the tests of SARTAK/MooseX-Role-Parameterized-0.19.tar.gz with a >> bunch of error diagnostics, starting with > > I *think* this is due to a bug (or rather, unreasonable expectations) > in that distribution's test suite. In particular, it has code roughly > like: > > sub foo { > map { SomeClass->new->some_method($_) } @_ > } > > i.e. it creates a temporary object each time through the map block, then > discards it. The change in blead means that the temporary object is freed > at the end of each map iteration, rather than at the next statement > boundary following the map. This means that the object's destructor is > called earlier, which makes the tests fail. > > The only question really is whether this is an acceptable change in blead. > I personally think it is. Opinions, anyone? We never guaranteed when destruction happens. But I dislike the early temporary object destruction as it looks like much slower inside map, to afterwards. Do we really need that? -- Reini UrbanThread Previous | Thread Next