[omniORB] Who cleans up CORBA::string_dup'd memory?

Mark Johnson mark.johnson@onfiber.com
Mon, 22 Oct 2001 10:44:46 -0500


ENV: omniORB3.0, Solaris 2.8, CC	

When using a CORBA::string_dup do you ever have to clean up that memory? 

I just had a really bizarre situation where an application that has been
running great for weeks all of a sudden started core dumping when displaying
string_dup'd variables. I even stopped and restarted the application,
restarted omniNames,  and even did a make clean and a rebuild it was still
core dumping. Out of desparation I rebooted the machine and the problem
seemed to go away...

ps: Is doing a CORBA::string_dup( "" ) safe?

For example:
  void InitObject( MyStruct & obj )
  {
      obj.name = CORBA::string_dup( "" );
  }