Subject: | Bug can cause memory leak (Patch included!) |
This bug is activated when calling a function whose result is *not*
going to the current session, for example:
$generic->func({ session => 'alias', event => 'result' });
In POE::Component::Generic::__request(), refcount_increment() is always
called on $sender, even if (like in the above example) the result event
will go to a different session.
Since in POE::Component::Generic::response(), refcount_decrement() is
called on the correct session, the $sender will always have its refcount
set too high, and can lead to that session never being stopped.
The attached patch fixes POE::Component::Generic::__request() to
refcount_increment() the correct session.
Please apply and make a new release at your earliest convenience!
Thank you,
David Snopek.
Subject: | Generic.pm.patch |
--- Generic.pm.old 2007-06-05 12:50:31.000000000 -0500
+++ Generic.pm 2007-06-05 13:52:38.000000000 -0500
@@ -330,7 +330,7 @@
# if we have an event to report to...make sure it stays around
if ($hash->{event}) {
- $poe_kernel->refcount_increment( $sender => $self->{name} );
+ $poe_kernel->refcount_increment( $params->{session} => $self->{name} );
}
if( $self->{callback_map}{$class}{ $method } ) {