xmlTreeCleanup

SYNOPSIS

void xmlTreeCleanup(xmlDoc doc [, int options])

Parameters:

  • doc - the xmlDoc to remove unlinked orphans from

  • options - specifying 1 will cause verbose messages to be printed about what it's cleaning up


DESCRIPTION
xmlTreeCleanup() can be used in very specific circumstances to assist with memory management of XML trees. Most code will never need to call this.

If you have a situation where:

  • You have a long running Vortex process, that

  • interacts with a single xmlDoc over a long period of time and

  • repeatedly creates and unlinks nodes via xmlTreeUnlinkNode
then the memory used by Vortex can steadily climb, as unlinked nodes are normally not freed until the xmlDoc they came from is freed. Calling xmlTreeCleanup() forces the xmlDoc to free any unlinked nodes that do not have any Vortex variables set to them.


EXAMPLE

<$ret = (xmlTreeCleanup($doc))>


Copyright © Thunderstone Software     Last updated: Apr 15 2024
Copyright © 2024 Thunderstone Software LLC. All rights reserved.