ReleaseString
Description
Frees the memory acquired using GetString, GetClassName,
GetFieldName, or GetEnumItemName.
Syntax
|
1 |
ReleaseString(LPCTSTR string) |
|
Argument |
Description |
|---|---|
|
string |
The string to be released from |
Return value
None.
Examples
The following example gets a pointer to each of two strings passed
in as arguments, concatenates them in a new string, then releases the
memory used by the original strings:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
pbstring psppcls:: f_add_string(IPB_Session* session, pbstring arg1, pbstring arg2) { LPCTSTR pStr1,pStr2; TCHAR tmp[100]; pbstring ret; pStr1=session-> GetString(arg1); pStr2=session-> GetString(arg2); _tcscpy(tmp,pStr1); _tcscat(tmp,pStr2); ret = session -> NewString(tmp); session-> ReleaseString(pStr1); session-> ReleaseString(pStr2); return ret ; } |
Usage
Do not use this function to release a string obtained using
GetDateString, GetTimeString, GetDateTimeString, or GetDecimalString.
Each of these Get methods has a corresponding Release method.
See also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest