Bug fix: Fix memory leaks in P4Perl reported by Craig Galley.
Perl's
reference count garbage collection is not much fun to work with,
but hopefully this change plugs P4Perl's leaks. There's still a
leak that remains, but whether it's in P4Perl's code or just in
Perl I don't know. A loop like this:
while( 1 ) {
my $p4 = new P4;
}
will leak like a sieve but I'm pretty sure P4Perl is cleaning up
as it should. While it's very difficult to be certain with Perl's
memory mode, creating one P4 object and using it multiple times
now appears to be pretty steady.
Also fixed use of uninitialized debug variable which could produce
debug output you hadn't asked for.