#include "SaPopCalls.h" void SaReturnLocalBuffer(char *str);
str
SaReturnLocalBuffer
removes a buffer from the local ring buffer.
After calling SaCopyLocalBuffer
, if you wish to free the local buffer returned by using SaCopyLocalBuffer
, simply call SaReturnLocalBuffer
using the same pointer that was returned by SaCopyLocalBuffer
.
The ring buffer is a list of up to 10 strings. When an eleventh item is added to it, the first item is removed and free'd and the eleventh item is appended to the end of the ring buffer. This makes sure that functions using the ring buffer can be called nine times before buffers are free'd and therefore become invalid.
This is used primarily with Widget Data Extraction functions that are embedded in other functions which require character pointers. This eliminates the need to free a returned string since it will be free'd automatically.