tpfree
-routine for freeing a typed buffer
#include <atmi.h>
void tpfree(char *ptr)
The argument to tpfree
() is a pointer to a buffer previously obtained by either tpalloc
(3) or tprealloc
(3). If ptr
is NULL, no action occurs. Undefined results will occur if ptr
does not point to a typed buffer (or if it points to space previously freed with tpfree
()). Inside service routines, tpfree
() returns and does not free the buffer if ptr
points to the buffer passed into a service routine.
Some buffer types require state information or associated data to be removed as part of freeing a buffer. tpfree
() removes any of these associations (in a communication manager-specific manner) before a buffer is freed.
Once tpfree
() returns, ptr
should not be passed as an argument to any BEA TUXEDO system routine or used in any other manner.
tpfree
() does not return any value to its caller. Thus, it is declared as a void.
This function should not be used in concert with malloc
(3C;), realloc
(3C;) or free
(3C;) in the C library (for example, a buffer allocated with tpalloc
(3) should not be freed with free
(3C)).
intro
(3), tpalloc
(3), tprealloc
(3)