just another curious question I have.
Being used to String handling like in Java and other languages delivering cool copy constructors,
I am a bit overwhelmed by the CS/OBSE string handling. (totally forgot about my c times there...)
The question:
Assuming sv_Destruct really gets rid of the String the (String)-Variable XYZ was assigned to,
do I have to make a difference between constructed strings and string literals.
All I know for string literals reside in memory as long as the program is running.
Calling sv_Destruct on String Variable XYZ, which has been assigned a string literal,
should only zero the string variable XYZ. (string points to zero ref)
But calling sv_Destruct on String Variable XYZ, which has been assigned a temporary string build with sv_Construct,
should delete the string completely. (string points to zero ref and memory is deallocated)
Now my thought was, every time I do assign a new constructed string with sv_Construct to String Variable XYZ,
I should call sv_Destruct on String Variable XYZ first, in order to dealloccate the memory from the previously
assigned string, which was assigned by sc_Construct too ( meaning it was no string literal)
Ok, thanks for any help here.
I really dont want to bloat anyones savegame, so this question might sound stupid, but im in lack of knowledge here, which isnt even available in OBSE docs. :toughninja: