T_FREE


Name

T_FREE — return allocated memory to the heap

Synopsis

void T_FREE(ptr) 
T_PTR ptr; 

Arguments

ptr — pointer to memory to be freed

Return Values

None

Diagnostics

None

Description

T_FREE uses TutFree to free dynamically allocated memory. T_FREE should only be used to free memory that has been allocated with T_MALLOC, T_CALLOC, T_REALLOC or T_STRDUP.

Caution

Unlike the ANSI C function free, T_FREE does not accept null pointers.

See Also

T_MALLOC, T_CALLOC, T_REALLOC, T_STRDUP

Examples

This example allocates and frees some memory:

T_STR dup_1; 
/* make a copy of a string */ 
T_STRDUP(dup_1, "hi there"); 
/* free it right away */ 
T_FREE(dup_1); 

TIBCO SmartSockets™ Utilities
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com