svn: /phpdoc/en/trunk/reference/weakref/weakref/ acquire.xml release.xml

From: Date: Thu, 14 May 2015 07:51:07 +0000
Subject: svn: /phpdoc/en/trunk/reference/weakref/weakref/ acquire.xml release.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-13287@lists.php.net to get a copy of this message
salathe Thu, 14 May 2015 07:51:07 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=336760 Log: The acquire/release behavior of a weakref instance (i.e. that Weakref::release() must be called once for each Weakref::acquire() to actually release the reference) was not clear. -- Patch by p@wspnr.com via online editor Changed paths: U phpdoc/en/trunk/reference/weakref/weakref/acquire.xml U phpdoc/en/trunk/reference/weakref/weakref/release.xml Modified: phpdoc/en/trunk/reference/weakref/weakref/acquire.xml =================================================================== --- phpdoc/en/trunk/reference/weakref/weakref/acquire.xml 2015-05-13 14:10:45 UTC (rev 336759) +++ phpdoc/en/trunk/reference/weakref/weakref/acquire.xml 2015-05-14 07:51:07 UTC (rev 336760) @@ -5,7 +5,7 @@ <refname>Weakref::acquire</refname> <refpurpose>Acquires a strong reference on that object</refpurpose> </refnamediv> - + <refsect1 role="description"> &reftitle.description; <methodsynopsis> @@ -16,13 +16,19 @@ Acquires a strong reference on that object, virtually turning the weak reference into a strong one. </para> + <para> + The <classname>Weakref</classname> instance maintains an internal acquired + counter to track outstanding strong references. If the call to + <methodname>Weakref::acquire</methodname> is successful, this counter + will be incremented by one. + </para> </refsect1> - + <refsect1 role="parameters"> &reftitle.parameters; &no.function.parameters; </refsect1> - + <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> @@ -30,7 +36,7 @@ reference, &false; otherwise. </para> </refsect1> - + <refsect1 role="examples"> &reftitle.examples; <para> @@ -73,7 +79,7 @@ </screen> </example> </para> - + <para> <example> <title>Nested acquire/release example</title> @@ -130,7 +136,7 @@ </example> </para> </refsect1> - + <refsect1 role="seealso"> &reftitle.seealso; <para> @@ -139,7 +145,7 @@ </simplelist> </para> </refsect1> - + </refentry> <!-- Keep this comment at the end of the file Modified: phpdoc/en/trunk/reference/weakref/weakref/release.xml =================================================================== --- phpdoc/en/trunk/reference/weakref/weakref/release.xml 2015-05-13 14:10:45 UTC (rev 336759) +++ phpdoc/en/trunk/reference/weakref/weakref/release.xml 2015-05-14 07:51:07 UTC (rev 336760) @@ -5,7 +5,7 @@ <refname>Weakref::release</refname> <refpurpose>Releases a previously acquired reference</refpurpose> </refnamediv> - + <refsect1 role="description"> &reftitle.description; <methodsynopsis> @@ -13,16 +13,23 @@ <void/> </methodsynopsis> <para> - Releases a previously acquired reference. Potentially turning a strong + Releases a previously acquired reference, potentially turning a strong reference back into a weak reference. </para> + <para> + The <classname>Weakref</classname> instance maintains an internal acquired + counter to track outstanding strong references. If the call to + <methodname>Weakref::release</methodname> is successful, this counter + will be decremented by one. Once this counter reaches zero, the strong + reference is turned back into a weak reference. + </para> </refsect1> - + <refsect1 role="parameters"> &reftitle.parameters; &no.function.parameters; </refsect1> - + <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> @@ -30,7 +37,7 @@ released, &false; otherwise. </para> </refsect1> - + <refsect1 role="examples"> &reftitle.examples; <para> @@ -74,7 +81,7 @@ </example> </para> </refsect1> - + <refsect1 role="seealso"> &reftitle.seealso; <para> @@ -83,7 +90,7 @@ </simplelist> </para> </refsect1> - + </refentry> <!-- Keep this comment at the end of the file

« previous php.doc.cvs (#13287) next »