diff Lib/IMPL/Profiler/Memory.pm @ 190:cd1ff7029a63

IMLP::Web::View refactored, added new method 'require' which is available inside templates. Changed document rendering.
author cin
date Wed, 04 Apr 2012 17:51:27 +0400
parents 08015e2803f1
children 4d0e1962161c
line wrap: on
line diff
--- a/Lib/IMPL/Profiler/Memory.pm	Wed Apr 04 02:49:45 2012 +0400
+++ b/Lib/IMPL/Profiler/Memory.pm	Wed Apr 04 17:51:27 2012 +0400
@@ -57,17 +57,19 @@
 use Data::Dumper();
 use Scalar::Util qw(refaddr weaken isweak);
 
-use fields qw( objects );
+use fields qw( objects counter);
 
 sub CTOR {
 	my $this = shift;
 	$this->{objects} = [];
+	$this->{counter} = 0;
 }
 
 sub track {
 	my $i = scalar @{$_[0]->{objects}};
 	$_[0]->{objects}[$i] = $_[1];
 	weaken($_[0]->{objects}[$i]);
+	$_[0]->{counter} ++;
 }
 
 sub Purge {