From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,54aae3da1cf935cd X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!newsfeed.stueberl.de!feed.news.tiscali.de!news.belwue.de!LF.net!news.enyo.de!not-for-mail From: Florian Weimer Newsgroups: comp.lang.ada Subject: Re: Ada Singleton Pattern Date: Thu, 16 Sep 2004 08:48:00 +0200 Message-ID: <87pt4m7lr3.fsf@deneb.enyo.de> References: <%Fi1d.245967$OR2.11136154@news3.tin.it> <14p6ezf3vze8j$.j05arkr066wi.dlg@40tude.net> <87llfdgcdf.fsf@deneb.enyo.de> <1sggrr7wk1p1l$.3c2vsu0kl9qo.dlg@40tude.net> <87wtywgadq.fsf@deneb.enyo.de> <91f7q67flszs$.1qe37rlese4ui$.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: albireo.enyo.de 1095317280 21768 212.9.189.171 (16 Sep 2004 06:48:00 GMT) X-Complaints-To: Cancel-Lock: sha1:otuHONGoj90DrdkWQejp5VULYy0= Xref: g2news1.google.com comp.lang.ada:3762 Date: 2004-09-16T08:48:00+02:00 List-Id: * Dmitry A. Kazakov: > But that is unrelated to the issue of whether the scope is known. If the > scope is known, then it is quite easy to ensure that there will be no > dangling references to the object. Ada visibility rules ensure that. If it > is unknown, then that is not just the singleton issue. How do you ensure that there's only a single instance of the singleton if it's not declared at the library level? 8-) > It is rather about pointers, smart pointers, handles, garbage > collection etc. Indeed, some think that these have to be part of a singleton that deals with destruction and not just construction.