Memory Free Functions
Memory free functions allow memory associated with a specific typed variable instance to be freed. Their use is not required to free memory - the run-time function rtxMemFree can be called directly with a context variable to free all memory associated with a context. There are applications, however, where freeing the memory contents of a specific variable are desirable.
Memory free functions are not generated for all types - only those that contain fields that use dynamic memory. This includes types that contain elements or attributes that reference other types that use dynamic memory. The format of a generated memory free function is as follows:
where <typeName> is the name of the XSD type for which the function is being generated and <ns> is an optional namespace setting that can be used to disambiguate names from multiple sources (note: this should not be confused with XML namespaces which are different).
<freeFunc> (OSCTXT* pctxt, <typeName>* pvalue)
Copyright © Objective Systems 2002-2008 This document may be distributed in any form, electronic or otherwise, provided that it is distributed in its entirety and that the copyright and this notice are included. |
Objective Systems, Inc.55 Dowlin Forge RoadExton, Pennsylvania 19341 http://www.obj-sys.com Phone: (484) 875-9841 Toll-free: (877) 307-6855 (US only) Fax: (484) 875-9830 info@obj-sys.com |