Article View: borland.public.cppbuilder.nativeapi
Article #15006Re: Stop and startng a service
From: Giuliano
Date: Sun, 20 Jul 2003 23:40
Date: Sun, 20 Jul 2003 23:40
21 lines
2228 bytes
2228 bytes
On Sun, 20 Jul 2003 16:36:49 -0700, "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> wrote: > >"Giuliano" <gcardinali@remove.adhoc.net> wrote in message >news:an6mhvo5ruvtki0ucmtqquntrb54gd9ej7@4ax.com... > >> Really??? Why not? If the auto_ptr is const you >> *have to* initialize it in the initializer list, like any >> other const instance. > >True. But auto_ptr is an oddity to begin with, and even the documentation >for auto_ptr points out the unusual syntax of its constructor. All I am >saying is that, in general, one does not see 'new' used that way. I'm not >saying it is not possible or wrong to do so, just rare. In my honest opinion, it's only a matter of taste. Smart pointers are very useful in order to avoid memory leaks. Only you don't use it with containers because the assignment operator has a bad semantics in that case. Giuliano
Technical Details
Message-ID:
<rk9mhv059dq5hqc8hhdc2j1oc1ifbrvn42@4ax.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3f163941$1@newsgroups.borland.com> <mdhchv8i6dsqrsemn6heka3sk41uj4cckg@4ax.com> <rghchv4m3v4qqrv0uqpg359inhsjm8i4kv@4ax.com> <3f17020b$1@newsgroups.borland.com> <8u2ehv8kjhckfkiijvbu2pq34p6pq5607m@4ax.com> <3f1715bd@newsgroups.borland.com> <3f19bb6b.7471904@newsgroups.borland.com> <3f1824a0@newsgroups.borland.com> <an6mhvo5ruvtki0ucmtqquntrb54gd9ej7@4ax.com> <3f1b264c@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,80e98d9661a7c48a X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-07-20 16:52:36 PST From: Giuliano <gcardinali@remove.adhoc.net> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Stop and startng a service Date: Mon, 21 Jul 2003 01:40:16 +0200 Message-ID: <rk9mhv059dq5hqc8hhdc2j1oc1ifbrvn42@4ax.com> References: <3f163941$1@newsgroups.borland.com> <mdhchv8i6dsqrsemn6heka3sk41uj4cckg@4ax.com> <rghchv4m3v4qqrv0uqpg359inhsjm8i4kv@4ax.com> <3f17020b$1@newsgroups.borland.com> <8u2ehv8kjhckfkiijvbu2pq34p6pq5607m@4ax.com> <3f1715bd@newsgroups.borland.com> <3f19bb6b.7471904@newsgroups.borland.com> <3f1824a0@newsgroups.borland.com> <an6mhvo5ruvtki0ucmtqquntrb54gd9ej7@4ax.com> <3f1b264c@newsgroups.borland.com> X-Newsreader: Forte Agent 1.91/32.564 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 81.72.236.130 X-Trace: newsgroups.borland.com 1058744413 81.72.236.130 (20 Jul 2003 16:40:13 -0700) Lines: 21 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail