summaryrefslogtreecommitdiff
path: root/lib/jabber.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-09-05 21:55:01 -0400
committerEvan Prodromou <evan@prodromou.name>2008-09-05 21:55:01 -0400
commit0c71340c9fecfad17d2619dfa44cb669023f8179 (patch)
tree1c936b6ffb2361a15a4e71fba2ffed5ce1226b73 /lib/jabber.php
parent9e8ae6a1e79c51baeca1063810ad96dadeab714d (diff)
free and unset DB_DataObjects after we're done with them
darcs-hash:20080906015501-84dde-e787962b9805759224389dd42a211dfa21da3473.gz
Diffstat (limited to 'lib/jabber.php')
-rw-r--r--lib/jabber.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/jabber.php b/lib/jabber.php
index a9643f4a6..bd7d6b707 100644
--- a/lib/jabber.php
+++ b/lib/jabber.php
@@ -92,6 +92,7 @@ function jabber_send_notice($to, $notice) {
$msg = jabber_format_notice($profile, $notice);
$entry = jabber_format_entry($profile, $notice);
$conn->message($to, $msg, 'chat', NULL, $entry);
+ $profile->free();
return true;
}
@@ -204,6 +205,9 @@ function jabber_broadcast_notice($notice) {
$msg = jabber_format_notice($profile, $notice);
$entry = jabber_format_entry($profile, $notice);
+ $profile->free();
+ unset($profile);
+
$sent_to = array();
$conn = jabber_connect();
@@ -225,6 +229,8 @@ function jabber_broadcast_notice($notice) {
$sent_to[$user->id] = 1;
}
+ $user->free();
+
# Now, get users subscribed to this profile
$user = new User();
@@ -245,6 +251,8 @@ function jabber_broadcast_notice($notice) {
}
}
+ $user->free();
+
return true;
}
@@ -280,6 +288,7 @@ function jabber_public_notice($notice) {
$conn->message($address, $msg, 'chat', NULL, $entry);
$conn->processTime(0);
}
+ $profile->free();
}
return true;