diff --git a/docs/gotcha.txt b/docs/gotcha.txt index 0ade8113f..e219ee4a9 100644 --- a/docs/gotcha.txt +++ b/docs/gotcha.txt @@ -7,6 +7,15 @@ upgrading from one version to the next, or even between multiple versions. Be sure to heed the warnings contained herein as they will save you many hours of grief. + +7.0.0 +-------------------------------------------------------------------- + + * There is a memory leak in Spectre. We're working on a solution to + this problem, but in the mean time you will need to restart spectre + every so often to clear out the memory. We recommend setting up a + cron job to restart it once per day. + 6.99.5 -------------------------------------------------------------------- diff --git a/lib/Spectre/Admin.pm b/lib/Spectre/Admin.pm index 855c89892..bd03cdb68 100644 --- a/lib/Spectre/Admin.pm +++ b/lib/Spectre/Admin.pm @@ -152,8 +152,8 @@ sub new { object_states => [ $self => {_start=>"_start", _stop=>"_stop", "shutdown"=>"_stop", "ping"=>"ping"} ], args=>[["shutdown","ping"]] ); - $self->{_workflow} = Spectre::Workflow->new($config, $logger, $debug); - $self->{_cron} = Spectre::Cron->new($config, $logger, $debug); + Spectre::Workflow->new($config, $logger, $debug); + Spectre::Cron->new($config, $logger, $debug); POE::Kernel->run(); } diff --git a/lib/Spectre/Workflow.pm b/lib/Spectre/Workflow.pm index 8f4349b6d..8deae2f5b 100644 --- a/lib/Spectre/Workflow.pm +++ b/lib/Spectre/Workflow.pm @@ -295,7 +295,7 @@ sub new { my $config = shift; my $logger = shift; my $debug = shift; - my $self = {_debug=>$debug, _config=>$config, _logger=>$logger}; + my $self = {_priority1=>[], _priority2=>[], _priority3=>[], _debug=>$debug, _config=>$config, _logger=>$logger}; bless $self, $class; my @publicEvents = qw(addInstance deleteInstance); POE::Session->create(