[omniORB] Memory management questions in ORB
Luo Yongheng
langsir at yeah.net
Sun Apr 6 00:55:46 BST 2008
Hi,
I did not find explanations on how to manage memory allocation/release with pointer types in C++ mapping specification.
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?
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?
Thanks.
Thierry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20080405/204f6a3e/attachment.htm
More information about the omniORB-list
mailing list