comparison Lib/IMPL/Object/Abstract.pm @ 33:0004faa276dc

small fixes, some new tests
author Sergey
date Mon, 09 Nov 2009 16:49:39 +0300
parents 7f00786f8210
children 16ada169ca75
comparison
equal deleted inserted replaced
32:56cef8e3cda6 33:0004faa276dc
63 my $self = shift; 63 my $self = shift;
64 64
65 return (ref $self || $self); 65 return (ref $self || $self);
66 } 66 }
67 67
68 sub DESTROY { 68 sub isDisposed {
69 if ($MemoryLeakProtection and $Cleanup) { 69 0;
70 my $this = shift;
71 warn sprintf("Object leaks: %s of type %s %s",$this->can('ToString') ? $this->ToString : $this,ref $this,UNIVERSAL::can($this,'_dump') ? $this->_dump : '');
72 }
73 } 70 }
71
72 #sub DESTROY {
73 # if ($MemoryLeakProtection and $Cleanup) {
74 # my $this = shift;
75 # warn sprintf("Object leaks: %s of type %s %s",$this->can('ToString') ? $this->ToString : $this,ref $this,UNIVERSAL::can($this,'_dump') ? $this->_dump : '');
76 # }
77 #}
74 78
75 sub END { 79 sub END {
76 $Cleanup = 1; 80 $Cleanup = 1;
77 } 81 }
78 82