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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f196003f7b36852b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-24 09:43:08 PST Newsgroups: comp.lang.ada Path: newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newspeer.monmouth.com!nntp.msen.com!uunet!ash.uu.net!xyzzy!nntp From: Jeffrey Carter Subject: Re: Question about Finalization Control and reference counting X-Nntp-Posting-Host: e246420.msc.az.boeing.com Content-Type: text/plain; charset=us-ascii Message-ID: <3AE5A5B5.4337CE90@boeing.com> Sender: nntp@news.boeing.com (Boeing NNTP News Access) Content-Transfer-Encoding: 7bit Organization: The Boeing Company X-Accept-Language: en References: Mime-Version: 1.0 Date: Tue, 24 Apr 2001 16:11:33 GMT X-Mailer: Mozilla 4.5 [en]C-CCK-MCD Boeing Kit (WinNT; U) Xref: newsfeed.google.com comp.lang.ada:6895 Date: 2001-04-24T16:11:33+00:00 List-Id: Adjust only applies to a controlled type, so you need to put your access value inside a controlled type: type Node; type Node_Ptr is access all Node; type Node is new [Limited_]Controlled with record Prev : Node_Ptr; Data : Whatever; Count : Natural := 0; Next : Node_Ptr; end record; procedure Adjust (Object : in out Node); procedure Finalize (Object : in out Node); For a doubly linked list like this, you probably don't need a reference count or Adjust. See the PragmAda Reusable Components (PragmARC.List_Unbounded_Unprotected) for just such a list.