Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #10431
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | markspace <-@.> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: java.io.File |
| Date | Fri, 02 Dec 2011 08:53:57 -0800 |
| Organization | A noiseless patient Spider |
| Lines | 30 |
| Message-ID | <jbavrf$5u1$1@dont-email.me> (permalink) |
| References | <lt6hd7h1agr1kb9vud97fpabja00p0pbtn@4ax.com> <1754083.312.1322839502470.JavaMail.geo-discussion-forums@prjr26> <5ushd716i6g4qncg620f49ancol20af51f@4ax.com> <20850741.465.1322842636010.JavaMail.geo-discussion-forums@prnu18> <4puhd7h1qgr5rq3cgeebmrt64cc7qfn004@4ax.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Fri, 2 Dec 2011 16:54:08 +0000 (UTC) |
| Injection-Info | mx04.eternal-september.org; posting-host="XjIWM99mD7Ijfdu600oVPA"; logging-data="6081"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+HtG26Ke9uxKQMJbEZ3msMsRTRU2cl7/M=" |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 |
| In-Reply-To | <4puhd7h1qgr5rq3cgeebmrt64cc7qfn004@4ax.com> |
| Cancel-Lock | sha1:iggjqOfV8ue2qzmeWrPAgmYUeVw= |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:10431 |
Show key headers only | View raw
On 12/2/2011 8:31 AM, Mark wrote: > On Fri, 2 Dec 2011 08:17:15 -0800 (PST), Lew<lewbloch@gmail.com> > wrote: >> If there were a 'close()' method, as there is with streams, it would have >> nothing to do with GC. 'close()' is for resources (such as file handles). >> GC is for heap memory. I only suggested checking for packratted 'File' >> instances as a foolish guess. Now that I think about it, it is highly >> unlikely that unclaimed instances would have anything to do with your issue. > AFAIK many classes have a close() method to allow any underlying OS > resources to be explicitly freed without needing to wait for the > dispose() method to do this. If the File method does uses file > descriptors then we may assume that these could be left open until the > object is destroyed during GC. What Mayeul said. File is just a pathname, so of course it has no "close" method. You should be looking for FileInputStream, InputStream, OutputStream, RandomAccessFile, and all their subclasses (which there are quite a few). Just looking for File won't cut it, as most of those classes take other objects besides File to construct a stream. For example, FileInputStream can also be constructed from a path in a String. Maybe you knew this and just misspoke, but it seemed like a point of confusion.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
java.io.File Mark <i@dontgetlotsofspamanymore.net> - 2011-12-02 09:35 +0000
Re: java.io.File Lew <lewbloch@gmail.com> - 2011-12-02 07:25 -0800
Re: java.io.File Mark <i@dontgetlotsofspamanymore.net> - 2011-12-02 15:55 +0000
Re: java.io.File Lew <lewbloch@gmail.com> - 2011-12-02 08:17 -0800
Re: java.io.File Mark <i@dontgetlotsofspamanymore.net> - 2011-12-02 16:31 +0000
Re: java.io.File markspace <-@.> - 2011-12-02 08:53 -0800
Re: java.io.File Lew <lewbloch@gmail.com> - 2011-12-02 14:02 -0800
Re: java.io.File Arne Vajhøj <arne@vajhoej.dk> - 2011-12-02 17:12 -0500
Re: java.io.File Lew <lewbloch@gmail.com> - 2011-12-02 14:16 -0800
Re: java.io.File Arne Vajhøj <arne@vajhoej.dk> - 2011-12-02 18:42 -0500
Re: java.io.File Lars Enderin <lars.enderin@telia.com> - 2011-12-03 01:06 +0100
Re: java.io.File Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> - 2011-12-07 15:51 +0200
Re: java.io.File Mark <i@dontgetlotsofspamanymore.net> - 2011-12-05 15:14 +0000
Re: java.io.File markspace <-@.> - 2011-12-05 07:49 -0800
Re: java.io.File Mark <i@dontgetlotsofspamanymore.net> - 2011-12-05 16:28 +0000
Re: java.io.File Lew <lewbloch@gmail.com> - 2011-12-05 15:25 -0800
Re: java.io.File Mark <i@dontgetlotsofspamanymore.net> - 2011-12-06 10:29 +0000
Re: java.io.File Arne Vajhøj <arne@vajhoej.dk> - 2011-12-02 17:08 -0500
Re: java.io.File Roedy Green <see_website@mindprod.com.invalid> - 2011-12-03 00:57 -0800
Re: java.io.File Mayeul <mayeul.marguet@free.fr> - 2011-12-02 17:33 +0100
Re: java.io.File Lew <lewbloch@gmail.com> - 2011-12-02 14:07 -0800
Re: java.io.File Mayeul <mayeul.marguet@free.fr> - 2011-12-06 15:52 +0100
Re: java.io.File Lew <lewbloch@gmail.com> - 2011-12-06 09:23 -0800
csiph-web