Issue 10550: DLRL Issue: Error in the ownership of a SelectionCriterion (data-distribution-rtf) Source: OCI (Mr. Donald Busch, busch_d(at)ociweb.com) Nature: Uncategorized Issue Severity: Summary: The spec says that the Selection takes ownership of the SelectionCriterion parameter passed in create_selection (see 3.1.6.3.7, ObjectHome, create_selection bullet item). However, this violates CORBA "in" parameter passing semantics, in which the client owns an "in" parameter and is responsible for it. The right way (in CORBA terms) to do this is for the client to create the FooSelectionCriterion on the heap, store it in a FooSelectionCriterion_var smart pointer, and let the smart pointer release it when it goes out of scope. The Selection can make a "copy" of the FooSelectionCriterion, presumably by bumping up its reference count. Resolution: Revised Text: Actions taken: December 22, 2006: received issue Discussion: End of Annotations:===== il-OSG: 6kk35H0VM1kLMfMp49nZH3ktTQzEnksCcws.CtJbPCUIie4JnYxO9ORVZbBqen6Hjilg1c_HT6EPjSAAncEySN._mB4xvmNJewLA1bPW4qlscL_yys7jjTIh0T8N6Nq3l4xv6CogKHaWWik- Date: Fri, 22 Dec 2006 16:56:39 -0600 From: Don Busch User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) To: issues@omg.org Subject: DDS 06-04-09, DLRL Issue: Error in the ownership of a SelectionCriterion The spec says that the Selection takes ownership of the SelectionCriterion parameter passed in create_selection (see 3.1.6.3.7, ObjectHome, create_selection bullet item). However, this violates CORBA "in" parameter passing semantics, in which the client owns an "in" parameter and is responsible for it. The right way (in CORBA terms) to do this is for the client to create the FooSelectionCriterion on the heap, store it in a FooSelectionCriterion_var smart pointer, and let the smart pointer release it when it goes out of scope. The Selection can make a "copy" of the FooSelectionCriterion, presumably by bumping up its reference count. -Don Busch -- ---------------------------------------------------------------- Don Busch, Principal Software Engineer and Partner Object Computing, Inc. (OCI) http://www.ociweb.com http://www.theaceorb.com http://jacorb.ociweb.com "Never let what you can't do get in the way of what you can do." - John Wooden X-YMail-OSG: KbyVpSEVM1lZOQelOREjqE7kmikR5wsOkg1T_qV7FQ1J.QgOcA1hpR5Oz9NkYse1cnzisM_DGel2r3yAN5b8_TjUm8qQv3cGhlB53uCQadZulI0JEYI- Date: Wed, 09 May 2007 13:24:42 -0500 From: Don Busch User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) To: data-distribution-rtf@omg.org Subject: [Issue 10550] This is not an issue. I misinterpreted "belongs" to imply memory ownership, when it really just means that a SelectionCriterion object may only be used in one Selection. -- ---------------------------------------------------------------- Don Busch, Principal Software Engineer and Partner Object Computing, Inc. (OCI) http://www.ociweb.com http://www.theaceorb.com http://jacorb.ociweb.com "Never let what you can't do get in the way of what you can do." - John Wooden ---------------------------------------------------------------- ----------------------------------------------------------------