axl main logo
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
void axl_stream_link ( axlStream stream,
axlPointer  element,
axlDestroyFunc  func 

Associates the given axlPointer with the given stream to be life-time dependant.

While performing the XML parsing, errors will be produced. This function ensures that the axlDoc document will be released if the stream is also released.

This not only reduces the possibility to produce a memory leak also allows to write less code.

Once the stream is not useful and it is required to be released, but not doing so with the axlDoc instance, a call to axl_stream_unlink is also required.

streamThe axlStream where the document will be linked to.
elementThe element to link (may a axlDoc or a axlDtd).
funcThe function to call once the stream is released.

References axl_false, and axl_stream_link_full().