php-doc-en/reference/xml/functions/xml-parser-free.xml
Christoph Michael Becker 4279863b96 Fix #76874: Documentation of memory leak in Xml Parser
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@345634 c90b9560-bf6c-de11-be94-00142212c4b1
2018-09-14 12:09:43 +00:00

74 lines
1.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.xml-parser-free">
<refnamediv>
<refname>xml_parser_free</refname>
<refpurpose>Free an XML parser</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>xml_parser_free</methodname>
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
</methodsynopsis>
<para>
Frees the given XML <parameter>parser</parameter>.
</para>
<caution>
<para>
In addition to calling <function>xml_parser_free</function> when the parsing
is finished, as of PHP 7.0.0 it is necessary to also explicitly unset the
reference to <parameter>parser</parameter> to avoid memory leaks,
if the parser resource is referenced from an object, and this object references
that parser resource.
</para>
</caution>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>parser</parameter></term>
<listitem>
<simpara>
A reference to the XML parser to free.
</simpara>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
This function returns &false; if <parameter>parser</parameter> does not
refer to a valid parser, or else it frees the parser and returns &true;.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->