[omniORB] Is CORBA::String_member essentially the same as COR BA::String_var ?

Lee, Robert C. RLee at northropgrumman.com
Tue May 27 14:45:33 BST 2003


Well, what if I want to assign a string to a string inside a struct? Which
is exactly what I want to do?

Robert

-----Original Message-----
From: Duncan Grisby [mailto:duncan at grisby.org]
Sent: Thursday, May 22, 2003 8:28 AM
To: Lee, Robert C.
Cc: 'omniorb-list at omniorb-support.com'
Subject: Re: [omniORB] Is CORBA::String_member essentially the same as
CORBA::String_var ? 


On Monday 19 May, "Lee, Robert C." wrote:

> Can I use String_member the same way I use String_var? That is, without
> having to worry about freeing the string if I do an assignment to
> String_member via CORBA::string_dup ??

You should never use String_member directly. It is used by the C++
mapping of strings within structs and things like that. It is
essentially the same as String_var, except that it initialises itself
to the empty string, rather than a zero pointer. It frees the string
when it goes out of scope, just like String_var.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the omniORB-list mailing list