Article View: borland.public.jbuilder.java.api
Article #272Re: Hashtable keys
From: Lori M Olson (TeamB)
Date: Thu, 25 Mar 2004 02:48
Date: Thu, 25 Mar 2004 02:48
40 lines
2136 bytes
2136 bytes
Jason Purcell wrote:
> I have a Hashtable where the keys are Connection objects,
> and the values are Boolean objects.
>
> My question is: Will the Connection objects ever be
> garbage-collected while the Hashtable is still valid
> and being used?
>
> By extension, are keys in a Hashtable ever automatically
> removed?
>
> Jason.
Be garbage collected? -- No. They are in the hash table, so their
reference count will be greater than zero.
Note that just because the Connection objects are there, doesn't mean
that the connections will still be valid/open. They will time-out.
"Automatically removed"? -- No. Where did you get that idea, anyway?
--
Regards,
Lori Olson (TeamB)
------------
Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.
Google Advanced Newsgroup Search
http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
http://www.visi.com/~gyles19/fom-serve/cache/1.html
Technical Details
Message-ID:
<4062487c$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<406030e5$2@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,54684b980608b0f4 X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2004-03-24 19:09:49 PST Date: Wed, 24 Mar 2004 19:48:15 -0700 From: "Lori M Olson (TeamB)" <javadragon@techie.com> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax; CDonDemand-Dom) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.java.api Subject: Re: Hashtable keys References: <406030e5$2@newsgroups.borland.com> In-Reply-To: <406030e5$2@newsgroups.borland.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 142.179.181.200 Message-ID: <4062487c$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1080182908 142.179.181.200 (24 Mar 2004 18:48:28 -0800) Lines: 41 Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail