Re: [Ssh-sftp-perl-users] [PATCH] Re: Net::SSH2::Channel objects not getting destroyed
Brought to you by:
dbrobins
From: David R. <dbr...@cp...> - 2006-05-07 02:23:00
|
On Thursday May 4, 2006 16:32, Stephen Clouse wrote: > This patch fixes the refcount bug. I finally noticed the GV was being > initialized with a refcount of 2, but couldn't figure out why. The > real problem is that sv_magic() is not fond of taking a mortal RV > (which ST(0) is) -- it needs a non-TEMP'd reference that can properly > be converted to a weakref (that is the internal magic that allows Perl > to clean up self-tied handles). Once the sv_magic call is fixed, the > refcount increment on the initial GV creation is no longer necessary, > and the refcounts are then correct. Thanks very much. I've applied your patch and the tests look good, and I think it's important enough to go out as 0.08 even though I haven't collected up any other changes yet. Expect to see it on CPAN shortly. ... > Just as a final note, my daemon has been running for several hours now > with this patch applied and has yet to leak a socket descriptor.... Excellent. Of course, you're credited in the changelog for the fix. -- Dave Isa. 40:31 |