[ First ] [ Previous ] [ Next ] [ Last ] [ Manuals ]
dont_reuse_strings

Description:
Specifies if each string literal should be stored separately in the string pool.
Compatibility:
This pragma is compatible with the following platform targets:
Prototype:
#pragma dont_reuse_strings on | off | reset
Remarks:
If the pragma dont_reuse_strings is on, the compiler stores each string literal separately. If this pragma is off, the compiler stores only one copy of identical string literals. This pragma helps you save memory if your program contains lots of identical string literals which you do not modify.
For example, take this code segment:
char *str1="Hello";
char *str2="Hello"
*str2 = 'Y';
If this option is on, str1 is "Hello" and str2 is "Yello". If this option is off, both str1 and str2 are "Yello".
This pragma corresponds to the Don't Reuse Strings option in the C/C++ Language Panel. To check whether this option is on, use __option (dont_reuse_strings), described in "Checking Options."
[ First ] [ Previous ] [ Next ] [ Last ] [ Manuals ]
Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.
Last updated: August 17, 2000