Currently we generate string constants as simple fields in the header file class we generate.
Each string constant initializer currently creates a new automatic arena, and allocates memory from it, then the string is copied into it.
We can share a single automatic arena between all string constants (and perhaps other things in the future as well), and we can use the holder class idiom for string constants so that we avoid an eager allocation & copy.
Each string constant initializer currently creates a new automatic arena, and allocates memory from it, then the string is copied into it.
We can share a single automatic arena between all string constants (and perhaps other things in the future as well), and we can use the holder class idiom for string constants so that we avoid an eager allocation & copy.