[Top] [Prev] [Next] [Bottom] [Contents]

SaReturnLocalBuffer

Frees an entry in the local ring buffer.

Synopsis

#include "SaPopCalls.h"
void SaReturnLocalBuffer(char *str);

Arguments

str

A pointer to a string returned by a call to SaCopyLocalBuffer.

Return Values

None.

Description

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.

See Also



[Top] [Prev] [Next] [Bottom] [Contents]

info@bluestone.com
Copyright © 1997, Bluestone. All rights reserved.