adding deconstructors
This commit is contained in:
parent
20d259dd0d
commit
970eeb048a
3 changed files with 46 additions and 5 deletions
|
|
@ -274,6 +274,21 @@ sub deleteRow {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head DESTROY ( )
|
||||
|
||||
Deconstructor.
|
||||
|
||||
=cut
|
||||
|
||||
sub DESTROY {
|
||||
my $self = shift;
|
||||
$self->disconnect;
|
||||
undef $self;
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 disconnect ( )
|
||||
|
|
|
|||
|
|
@ -99,12 +99,10 @@ Cleans up a WebGUI session information from memory and disconnects from any reso
|
|||
|
||||
sub close {
|
||||
my $self = shift;
|
||||
$self->asset->DESTROY() if (exists $self->asset && $self->asset ne "");
|
||||
foreach my $slavedbh (@{$self->{_slave}}) {
|
||||
$slavedbh->disconnect();
|
||||
foreach my $object (keys %{$self}) {
|
||||
$self->{$object}->DESTROY;
|
||||
}
|
||||
$self->{_db}->disconnect if (exists $self->{_db});
|
||||
undef %session;
|
||||
undef $self;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -179,6 +177,20 @@ sub dbSlave {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head DESTROY ( )
|
||||
|
||||
Deconstructor.
|
||||
|
||||
=cut
|
||||
|
||||
sub DESTROY {
|
||||
my $self = shift;
|
||||
$self->close;
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 env ( )
|
||||
|
|
|
|||
|
|
@ -173,6 +173,20 @@ sub deleteFromGroups {
|
|||
$group->deleteUsers([$self->userId],$groups);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head DESTROY ( )
|
||||
|
||||
Deconstructor.
|
||||
|
||||
=cut
|
||||
|
||||
sub DESTROY {
|
||||
my $self = shift;
|
||||
undef $self;
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getGroups ( [ withoutExpired ] )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue