Issue 3381: _name and _rep_id (cxx_revision) Source: Triodia Technologies Pty Ltd (Mr. Michi Henning, michi(at)triodia.com) Nature: Uncategorized Issue Severity: Summary: Question: do I need to deallocate the string returned by Exception::_name() and Exception::_rep_id() or not? The spec doesn't say... Given that these are PIDL, and that the return value is const char * (rather than non-const char *), I'd say that I shouldn't have to deallocate the return value. But I think we should clarify this in the spec. Also, the Exception class in section 1.41.7 doesn't show the _name and _rep_id members, so we need to add them there. Further, Exception doesn't show up in section 1.23 (Mapping of Pseudo Objects). I suspect that we need to add Exception there as well and mention the exception to the memory management rules? Another interesting thing is that, if Exception is a pseudo object, then UserException and everything derived from it is also a pseudo object. But, user exceptions can't be pseudo objects. But, if they are not pseudo-objects, we can't really make special-purpose memory managment rules. Sigh... :-( Resolution: see below Revised Text: Add the following to the end of the second para on page 1-98: The return value of _name() and _rep_id() must not be deallocated. Add the _name() and _rep_id() member functions to section 1.41.7 (they are missing there). Actions taken: March 1, 2000: received issue October 3, 2001: closed issue Discussion: End of Annotations:===== Date: Wed, 1 Mar 2000 13:57:07 +1000 (EST) From: Michi Henning Reply-To: C++ Revision Task Force To: C++ Revision Task Force cc: issues@omg.org Subject: _name and _rep_id Message-ID: Organization: Object Oriented Concepts MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-UIDL: 0>p!!1SJ!!EoQd9XG-e9 Question: do I need to deallocate the string returned by Exception::_name() and Exception::_rep_id() or not? The spec doesn't say... Given that these are PIDL, and that the return value is const char * (rather than non-const char *), I'd say that I shouldn't have to deallocate the return value. But I think we should clarify this in the spec. Also, the Exception class in section 1.41.7 doesn't show the _name and _rep_id members, so we need to add them there. Further, Exception doesn't show up in section 1.23 (Mapping of Pseudo Objects). I suspect that we need to add Exception there as well and mention the exception to the memory management rules? Another interesting thing is that, if Exception is a pseudo object, then UserException and everything derived from it is also a pseudo object. But, user exceptions can't be pseudo objects. But, if they are not pseudo-objects, we can't really make special-purpose memory managment rules. Sigh... :-( Cheers, Michi. -- Michi Henning +61 7 3891 5744 Object Oriented Concepts +61 4 1118 2700 (mobile) Suite 4, 904 Stanley St +61 7 3891 5009 (fax) East Brisbane 4169 michi@ooc.com.au AUSTRALIA http://www.ooc.com.au/staff/michi-henning.html Sender: jon@corvette.floorboard.com Message-ID: <38BD5D86.6F901C50@floorboard.com> Date: Wed, 01 Mar 2000 10:12:22 -0800 From: Jonathan Biggar X-Mailer: Mozilla 4.7 [en] (X11; U; SunOS 5.5.1 sun4m) X-Accept-Language: en MIME-Version: 1.0 To: C++ Revision Task Force CC: issues@omg.org Subject: Re: _name and _rep_id References: Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-UIDL: _Knd9W-:!!6d(e9Wgld9 Michi Henning wrote: > > Question: do I need to deallocate the string returned by > Exception::_name() > and Exception::_rep_id() or not? The spec doesn't say... > > Given that these are PIDL, and that the return value is const char * > (rather than non-const char *), I'd say that I shouldn't have to > deallocate > the return value. But I think we should clarify this in the spec. > > Also, the Exception class in section 1.41.7 doesn't show the _name > and > _rep_id members, so we need to add them there. > > Further, Exception doesn't show up in section 1.23 (Mapping of > Pseudo > Objects). I suspect that we need to add Exception there as well and > mention the exception to the memory management rules? Another > interesting > thing is that, if Exception is a pseudo object, then UserException > and > everything derived from it is also a pseudo object. But, user > exceptions > can't be pseudo objects. But, if they are not pseudo-objects, we > can't > really make special-purpose memory managment rules. Sigh... :-( I don't think it follows. We maintain the C++ specification, so we can do (within reason) anything we want. I do agree that we need specific text to clarify that the strings returned by _name & _rep_id must not be deallocated. -- Jon Biggar Floorboard Software jon@floorboard.com jon@biggar.org From: Paul Kyzivat To: "'C++ Revision Task Force'" Subject: RE: _name and _rep_id Date: Wed, 1 Mar 2000 13:46:25 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: text/plain; charset="iso-8859-1" X-UIDL: ^1"e9%Vj!!I1J!!S? -----Original Message----- > From: Michi Henning [mailto:michi@ooc.com.au] > Sent: Tuesday, February 29, 2000 10:57 PM > To: C++ Revision Task Force > Cc: issues@omg.org > Subject: _name and _rep_id > > > > Question: do I need to deallocate the string returned by > Exception::_name() > and Exception::_rep_id() or not? The spec doesn't say... > > Given that these are PIDL, and that the return value is const char * > (rather than non-const char *), I'd say that I shouldn't have > to deallocate > the return value. But I think we should clarify this in the spec. These should *not* need to be deallocated. The alternative makes them far less useful. Date: Thu, 2 Mar 2000 09:09:02 +1000 (EST) From: Michi Henning To: Paul Kyzivat cc: "'C++ Revision Task Force'" Subject: RE: _name and _rep_id In-Reply-To: <9B164B713EE9D211B6DC0090273CEEA926BCA3@bos1.noblenet.com> Message-ID: Organization: Object Oriented Concepts MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-UIDL: ;Ng!!A4Ge9-YJe9]%N!! On Wed, 1 Mar 2000, Paul Kyzivat wrote: > > Given that these are PIDL, and that the return value is const char * > > (rather than non-const char *), I'd say that I shouldn't have > > to deallocate > > the return value. But I think we should clarify this in the spec. > > These should *not* need to be deallocated. The alternative makes them far > less useful. I agree with you and Jon, but we need to say so in the spec. Cheers, Michi. -- Michi Henning +61 7 3891 5744 Object Oriented Concepts +61 4 1118 2700 (mobile) Suite 4, 904 Stanley St +61 7 3891 5009 (fax) East Brisbane 4169 michi@ooc.com.au AUSTRALIA http://www.ooc.com.au/staff/michi-henning.html Date: Mon, 15 Jan 2001 23:53:12 -0330 From: Matthew Newhook To: cxx_revision@omg.org Subject: issue 3381: _name and _rep_id Message-ID: <20010115235312.B12469@ooc.com> Mime-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.2.5i Content-Type: text/plain; charset=us-ascii X-UIDL: R_"e9PDOe9+APd9]1F!! Hi, We should simply vote on this one. No deallocation necessary. Matthew -- Matthew Newhook E-Mail: mailto:matthew@ooc.com Software Designer WWW: http://www.ooc.com Object Oriented Concepts, Inc. Phone: (709) 738-3725 Date: Tue, 16 Jan 2001 16:59:12 -0330 From: Matthew Newhook To: cxx_revision@omg.org Subject: Re: issue 3381: _name and _rep_id Message-ID: <20010116165912.A31152@ooc.com> References: <20010115235312.B12469@ooc.com> Mime-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010115235312.B12469@ooc.com>; from matthew@ooc.com on Mon, Jan 15, 2001 at 11:53:12PM -0330 Content-Type: text/plain; charset=us-ascii X-UIDL: *F6e9^8V!!j5i!!;b2!! Hi, On Mon, Jan 15, 2001 at 11:53:12PM -0330, Matthew Newhook wrote: > Hi, > > We should simply vote on this one. No deallocation necessary. Proposal for text update: Change: The _name() function returns the unqualified (unscoped) name of the exception. The _rep_id() function returns the repository ID of the exception. To: The _name() function returns the unqualified (unscoped) name of the exception. The _rep_id() function returns the repository ID of the exception. The returned pointer must not be freed. > Matthew > -- > Matthew Newhook E-Mail: mailto:matthew@ooc.com > Software Designer WWW: http://www.ooc.com > Object Oriented Concepts, Inc. Phone: (709) 738-3725 Regards, Matthew -- Matthew Newhook E-Mail: mailto:matthew@ooc.com Software Designer WWW: http://www.ooc.com Object Oriented Concepts, Inc. Phone: (709) 738-3725 Date: Thu, 15 Feb 2001 16:59:29 +1000 (EST) From: Michi Henning To: C++ Revision Task Force Subject: C++ RTF 2.6, vote 1 Message-ID: Organization: Object Oriented Concepts MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-UIDL: k(