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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,19140af19dfa6e01 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-09-13 03:37:12 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!easynews.net!newsfeed3.easynews.net!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: Ada 0Y plans for garbage collection? Date: Sat, 13 Sep 2003 11:54:51 +0200 Organization: AdaCL Message-ID: <1628992.MuEcJQX0hj@linux1.krischik.com> References: <1127954.kcBZz6amlf@linux1.krischik.com> <3F60E747.40805@attbi.com> <3F62004D.6080704@attbi.com> Reply-To: krischik@users.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.t-online.com 1063449255 07 16919 DeamVHrETyYnKF 030913 10:34:15 X-Complaints-To: usenet-abuse@t-online.de X-ID: E2XfpBZGQeBS1ejmdVyV40ErLsphPxTG9j2sbQfvev6CKessdzuXkZ User-Agent: KNode/0.7.2 Xref: archiver1.google.com comp.lang.ada:42437 Date: 2003-09-13T11:54:51+02:00 List-Id: Robert I. Eachus wrote: > Dmitry A. Kazakov wrote: >> But reference counting could be made much more easy and attractive if >> smart pointers have more light-weighted implementation than controlled >> types in generic packages. There are too many problems with that... > > Agreed, which is why you want to use a reference counted storage pool. > That way the count is stored with the object, and you only incur the > overhead when you create a new counted access value. Yes. > Anyone want to work with me on a "standard" reference counted storage > pool for Ada 200Y? The storage pool will only be a couple of pages of > code. The real effort is in documenting it and providing examples of use. But for it to work realy user friendly, would you not need compiler support? Everytime a new access is created or destroyed the compiler would need to tell the storrage pool. Remember: controlled types where considered not user friendly. If I undersand the OP right he wants: type Some_Access is access Some_Type; for Some_Access'Storrage_Pool use Ada.Reference_Counted__Pools.Pool; the rest need to be done by the compiler. With regards Martin -- mailto://krischik@users.sourceforge.net http://www.ada.krischik.com