Memory management question
- From: Jules Colding <colding omesc com>
- To: ORBit2 <orbit-list gnome org>
- Subject: Memory management question
- Date: Fri, 21 Jan 2005 13:43:43 +0100
Hi,
I have an interface such as:
module BRUTUS {
union SRestriction {
/* lots of variable sized stuff */
};
interface SRestrictionContainer {
readonly attribute SRestriction content;
}
};
The get_content() attribute method is defined as:
static BRUTUS_SRestriction *impl_BRUTUS_SRestrictionContainer__get_content(impl_POA_BRUTUS_SRestrictionContainer *servant,
CORBA_Environment *ev)
{
BRUTUS_SRestriction *retval;
/* ------ insert method code here ------ */
retval = &servant->attr_content;
/* ------ ---------- end ------------ ------ */
return retval;
}
So my question is now: Should I just return a pointer to attr_content as
I do above or should I make a copy of servant->attr_content ?
Thanks,
jules
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]