[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference pamsrc::objectbroker_development

Title:ObjectBroker Development - BEA Systems' CORBA
Notice:See note 2 for kit locations; note 4 for training
Moderator:RECV::GUMBELd
Created:Thu Dec 27 1990
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2482
Total number of notes:13057

2429.0. "String_var(char *) - does it copy the memory?" by CFSCTC::HUSTON (Steve Huston) Wed Feb 05 1997 18:55

If I have a String_var that uses the String_var(char *) constructor,
does the String_var copy the initializer string, or keep the pointer
and release the memory when the String_var is released?

The general T_var spec says it'll keep the pointer, not make a copy
of the char *'s memory, and delete it when the T_var is deleted.  The
String_var section didn't say (that I saw).

Thanks,

-Steve
T.RTitleUserPersonal
Name
DateLines
2429.1It will keep the pointer in that caseRECV::VLATASWARNING: Do not swallow the battery doorThu Feb 06 1997 09:565
    
    The String_var constructor for a non-const char * pointer will
    keep the pointer and will not copy the data.
    
    Tony