summaryrefslogtreecommitdiff
path: root/scripts/createsim.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-01-04 22:49:09 -1000
committerEvan Prodromou <evan@status.net>2010-01-04 22:49:09 -1000
commit0c31c3d80c379c3db1c063e3caba0d450bb83ab7 (patch)
tree880533b683d7bcbf86d29fb032ea611a8f3baede /scripts/createsim.php
parent7aeb11bb077079d5008e9c07e3945b466eb2d3b8 (diff)
free some memory in createsim.php
Diffstat (limited to 'scripts/createsim.php')
-rw-r--r--scripts/createsim.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/scripts/createsim.php b/scripts/createsim.php
index 1266a9700..882d74456 100644
--- a/scripts/createsim.php
+++ b/scripts/createsim.php
@@ -41,9 +41,12 @@ require_once INSTALLDIR.'/scripts/commandline.inc';
function newUser($i)
{
global $userprefix;
- User::register(array('nickname' => sprintf('%s%d', $userprefix, $i),
- 'password' => sprintf('password%d', $i),
- 'fullname' => sprintf('Test User %d', $i)));
+ $user = User::register(array('nickname' => sprintf('%s%d', $userprefix, $i),
+ 'password' => sprintf('password%d', $i),
+ 'fullname' => sprintf('Test User %d', $i)));
+ if (!empty($user)) {
+ $user->free();
+ }
}
function newNotice($i, $tagmax)
@@ -73,6 +76,9 @@ function newNotice($i, $tagmax)
}
$notice = Notice::saveNew($user->id, $content, 'system');
+
+ $user->free();
+ $notice->free();
}
function newSub($i)
@@ -106,6 +112,9 @@ function newSub($i)
}
subs_subscribe_to($from, $to);
+
+ $from->free();
+ $to->free();
}
function main($usercount, $noticeavg, $subsavg, $tagmax)