classes under session should weaken their session references
This commit is contained in:
parent
241c94175f
commit
2b78fe913b
17 changed files with 81 additions and 248 deletions
|
|
@ -16,12 +16,12 @@ package WebGUI::Session::Style;
|
|||
|
||||
|
||||
use strict;
|
||||
use Tie::CPHash;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Macro;
|
||||
require WebGUI::Asset;
|
||||
BEGIN { eval { require WebGUI; WebGUI->import } }
|
||||
use HTML::Entities ();
|
||||
use Scalar::Util qw(weaken);
|
||||
|
||||
=head1 NAME
|
||||
|
||||
|
|
@ -56,19 +56,6 @@ These methods are available from this class:
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 DESTROY ( )
|
||||
|
||||
Deconstructor.
|
||||
|
||||
=cut
|
||||
|
||||
sub DESTROY {
|
||||
my $self = shift;
|
||||
undef $self;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
sub _generateAdditionalTags {
|
||||
my $var = shift;
|
||||
return sub {
|
||||
|
|
@ -181,7 +168,9 @@ A reference to the current session.
|
|||
sub new {
|
||||
my $class = shift;
|
||||
my $session = shift;
|
||||
bless {_session=>$session}, $class;
|
||||
my $self = bless { _session => $session}, $class;
|
||||
weaken $self->{_session};
|
||||
return $self;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue