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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3ccb707f4c91a5f2 X-Google-Attributes: gid103376,public From: "Brian R. Hanson" Subject: Re: Java vs Ada 95 (Was Re: Once again, Ada absent from DoD SBIR solicitation) Date: 1996/10/15 Message-ID: <3263B39A.59E2@cray.com>#1/1 X-Deja-AN: 189589274 references: <325BC3B3.41C6@hso.link.com> <325D7F9B.2A8B@gte.net> content-type: text/plain; charset=us-ascii organization: Cray Research a division of Silicon Graphics, Inc. mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 3.0SC-SGI (X11; I; IRIX 6.2 IP22) Date: 1996-10-15T00:00:00+00:00 List-Id: Dale Stanbrough wrote: > > > I don't believe that Java even defines a way to explicitly deallocate > > a specified piece of memory, like Ada's Unchecked_Conversion or C++'s > > free(). > > The Java LRM recommends > > s = null; > > to force the deallocation of items (at least i think it's "null"!) This does not force the deallocation of the item. It removes a reference so that it can be reclaimed at some point (if not otherwise referenced). A common problem when coding in the presence of GC is leaving a dangling reference so some unneeded item preventing it from being reclaimed. It is most unfortunate if it is the head of a very large list or tree. -- Brian Hanson -- brh@cray.com