Path: csiph.com!weretis.net!feeder8.news.weretis.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c++ Subject: Re: A string pointer to a static or dynamic string : how to free the dynamic one ? Date: Thu, 02 Feb 2023 17:38:18 -0800 Organization: A noiseless patient Spider Lines: 27 Message-ID: <86y1pfcyut.fsf@linuxsc.com> References: <61d28ae0-d30f-47f7-adc2-bdadfd20d443n@googlegroups.com> <87a62bie22.fsf@nosuchdomain.example.com> <604d1f9c-51b9-4e7d-9c69-25b235a0eb5en@googlegroups.com> <87wn5egtw8.fsf@nosuchdomain.example.com> <87zga9f0rj.fsf@nosuchdomain.example.com> <867cx0dt5l.fsf@linuxsc.com> <1997eccc-306e-4f04-b8d3-d0552fd95b22n@googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader01.eternal-september.org; posting-host="b6486e9403ae3d4d176b8bb615daf221"; logging-data="1201987"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18M9iO1vhfYL1CSCdB9NxEB7QpgA9frzLs=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:wJuy5ikEkcdUm01j6VfiMtCNjF8= sha1:urKgClzXaims1XnYQFEo4iGn7X4= Xref: csiph.com comp.lang.c++:88963 "james...@alumni.caltech.edu" writes: > On Thursday, February 2, 2023 at 9:44:06 AM UTC-5, Tim Rentsch wrote: > >> Keith Thompson writes: > > ... > >>> The word "object" is not about object-oriented programming. The C >>> standard defines an "object" as a "region of data storage in the >>> execution environment, the contents of which can represent values"; >>> it doesn't use the term "variable". The C++ standard uses the word >>> "object" in the same way, though it doesn't have quite the same >>> formal definition. >>> >>> An "object" is just a variable, except that a variable typically has >>> a name. >> >> Just a quibble: C does have some objects that are not variables >> in the usual sense of the word. ... > > True, and his comment implies that fact, by using the word "except" > - when that exception does not apply, you still have an object, but > not a variable. I suppose that is one way of reading it. But certainly it is not the only way of reading it.