<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.6000.16608" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I did not find explanations on how to manage memory
allocation/release with pointer types in C++ mapping specification.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>If a servant function returns a pointer to a
dynamically allocated memory, the servant generally allocates a heap memory
block and assign it to the returned pointer. Then whose responsibility is it to
release this heap memory block? </FONT></DIV>
<DIV><FONT face=Arial size=2>According to the case explanation on returning
string type (very similiar to pointer type?) in mapping specification, it is the
caller's responsibility to release the memory. From servant side, the caller is
the ORB. So we can say it is the ORB's responsibility to release all memories
allocated by servants? So what routines should I conform to when allocating
memory in servants?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thierry</FONT></DIV></BODY></HTML>