Next: Data Type Definition, Up: Interpreters And This Library [Index]
The string data operated by the libaime interpreters is immutable. There are no multiple references to the same string, except for a special empty string value.
See x1f4_c1_empty_string.
The x1f4_c1_empty_string
value belongs with the C
programming interface. It is a constant empty string (zero long, that is) and
is not to be freed. Variables of the intrinsic string type are initialized
with this value.
When not set as x1f4_c1_empty_string
, string variables point (or should)
to some allocated data, that is not referred otherwise and should be freed once
no longer used. Same applies (or should) to string data referred by data
objects able to store references to other objects (former objects such as list
objects).
See List Library.
String data not referred by variables or collections may not be freeable. Such non freeable data may be the return of functions returning string data.
String data (and data of any data type requiring memory / resource management) may need be freed and yet not be variable or collection referred. Data referred by the return of functions returning string data belongs to this data class when it needs be freed (the functions need to arrange for the eventual release of the allocated memory).
See Temporaries.
Application code meant to interoperate the libaime library code is to observe the string operation conventions.