cvs: pear /Structures_LinkedList Double.php Single.php index.html package.xml
| From: | Dan Scott | Date: | Sun, 15 Oct 2006 13:04:57 +0000 |
| Subject: | cvs: pear /Structures_LinkedList Double.php Single.php index.html package.xml | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-42581@lists.php.net to get a copy of this message | ||
dbs Sun Oct 15 13:04:57 2006 UTC
Modified files:
/pear/Structures_LinkedList Double.php Single.php index.html
package.xml
Log:
Implement destructors to free up vast amounts of memory.
http://cvs.php.net/viewvc.cgi/pear/Structures_LinkedList/Double.php?r1=1.2&r2=1.3&diff_format=u
Index: pear/Structures_LinkedList/Double.php
diff -u pear/Structures_LinkedList/Double.php:1.2 pear/Structures_LinkedList/Double.php:1.3
--- pear/Structures_LinkedList/Double.php:1.2 Sat Oct 14 16:39:40 2006
+++ pear/Structures_LinkedList/Double.php Sun Oct 15 13:04:57 2006
@@ -48,7 +48,7 @@
* @author Dan Scott <dscott@laurentian.ca>
* @copyright 2006 Dan Scott
* @license http://www.apache.org/licenses/LICENSE-2.0
Apache License, Version 2.0
- * @version CVS: $Id: Double.php,v 1.2 2006/10/14 16:39:40 dbs Exp $
+ * @version CVS: $Id: Double.php,v 1.3 2006/10/15 13:04:57 dbs Exp $
* @link http://pear.php.net/package/Structures_LinkedList_Single
* @example double_link_example.php
*
@@ -111,7 +111,9 @@
/*
* Starting with root node, set last node = root_node
* get next node
- * if next node exists, delete last node reference to next
+ * if next node exists:
+ * delete last node's references to next node and previous node
+ * make the old next node the new last node
*/
if (!$last_node = $this->root_node) {
return;
@@ -119,6 +121,7 @@
while ($next_node = $last_node->next()) {
$last_node->setNext(null);
$last_node->setPrevious(null);
+ $last_node = $next_node;
}
$this->current = null;
$this->root_node = null;
http://cvs.php.net/viewvc.cgi/pear/Structures_LinkedList/Single.php?r1=1.2&r2=1.3&diff_format=u
Index: pear/Structures_LinkedList/Single.php
diff -u pear/Structures_LinkedList/Single.php:1.2 pear/Structures_LinkedList/Single.php:1.3
--- pear/Structures_LinkedList/Single.php:1.2 Sat Oct 14 16:39:40 2006
+++ pear/Structures_LinkedList/Single.php Sun Oct 15 13:04:57 2006
@@ -48,7 +48,7 @@
* @author Dan Scott <dscott@laurentian.ca>
* @copyright 2006 Dan Scott
* @license http://www.apache.org/licenses/LICENSE-2.0
Apache License, Version 2.0
- * @version CVS: $Id: Single.php,v 1.2 2006/10/14 16:39:40 dbs Exp $
+ * @version CVS: $Id: Single.php,v 1.3 2006/10/15 13:04:57 dbs Exp $
* @link http://pear.php.net/package/Structures_LinkedList_Single
* @example single_link_example.php
*
@@ -126,13 +126,16 @@
/*
* Starting with root node, set last node = root_node
* get next node
- * if next node exists, delete last node reference to next
+ * if next node exists, delete last node reference to next node
*/
if (!$last_node = $this->root_node) {
return;
}
while ($next_node = $last_node->next()) {
$last_node->setNext(null);
+ $temp_node = $last_node;
+ $last_node = $next_node;
+ unset($temp_node);
}
$this->current = null;
$this->root_node = null;
http://cvs.php.net/viewvc.cgi/pear/Structures_LinkedList/index.html?r1=1.1&r2=1.2&diff_format=u
Index: pear/Structures_LinkedList/index.html
diff -u pear/Structures_LinkedList/index.html:1.1 pear/Structures_LinkedList/index.html:1.2
--- pear/Structures_LinkedList/index.html:1.1 Wed Oct 11 03:24:34 2006
+++ pear/Structures_LinkedList/index.html Sun Oct 15 13:04:57 2006
@@ -11,7 +11,7 @@
<p>This package requires PHP 5, and was primarily developed with PHP 5.1.4. I have also
successfully tested 5.2.0RC1 through RC4.</p>
<h2><a name="download">Download</a></h2>
-<p>Current release: <a href="current.tgz">current.tgz</a>.</p>
+<p>Current release: <a
href="Structures_LinkedList-0.0.8.tgz">Structures_LinkedList-0.0.8.tgz</a>.</p>
<p>See <a href="#previous">Previous releases</a> for older versions
<h2>Documentation</h2>
http://cvs.php.net/viewvc.cgi/pear/Structures_LinkedList/package.xml?r1=1.1&r2=1.2&diff_format=u
Index: pear/Structures_LinkedList/package.xml
diff -u pear/Structures_LinkedList/package.xml:1.1 pear/Structures_LinkedList/package.xml:1.2
--- pear/Structures_LinkedList/package.xml:1.1 Wed Oct 11 03:24:34 2006
+++ pear/Structures_LinkedList/package.xml Sun Oct 15 13:04:57 2006
@@ -18,10 +18,10 @@
<email>dbs@php.net</email>
<active>yes</active>
</lead>
- <date>2006-10-10</date>
+ <date>2006-10-14</date>
<version>
- <release>0.0.8</release>
- <api>0.0.8</api>
+ <release>0.1.0</release>
+ <api>0.1.0</api>
</version>
<stability>
<release>alpha</release>
@@ -29,7 +29,7 @@
</stability>
<license uri="http://apache.org/licenses/LICENSE-2.0">Apache
License, Version 2.0</license>
<notes>
-* Convert to PEAR_Exception for error handling
+Implement destructors to return memory
</notes>
<contents>
<dir name="/" baseinstalldir="Structures/LinkedList">