On Sat, Dec 30, 2000 at 01:58:35AM -0500, Scott Gregory Miller wrote:
< > 
> > No, this animal really does exist in Java.  Actually, it is a major
> > issue in Java.  If it wasn't a major issue in Java, then at least one
> > major article in an issue of Doctor Dobb's Journal was a complete
> > lie.  A prominent example of this is you pass an object to another
> > object as a listener.  If you forget to remove the former object from
> > the latter object, the former object will never be GCed as long as the
> > latter object exists.
> I think you misread the article.  No such bug/issue exists in Java.  The
> listener example holds, but has nothing to do with private/protected.
> That is an example of giving a reference to a datastructure and forgetting
> you've done so.  Its not a memory leak.  A memory leak is when all
> references to an allocated block of memory are lost and no mechanism
> exists to reclaim it.

This is what I have been referring to as a memory leak. Obviously the true
kind of leak where memory is not deallocated is not possible, but whatever
you want to call this it still leads to unnecessary memory usage.

My prime suspect of this is the streams and the FileData objects, since
the FileData object keeps a reference to all streams going out of it, and
the FileData objects can live for a very long time (as long as the data
stays in the DataStore). But I thought I was pretty careful when I wrote
that...

> 
>       Scott
> 
> 
> _______________________________________________
> Freenet-dev mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/mailman/listinfo/freenet-dev

-- 
'DeCSS would be fine. Where is it?'
'Here,' Montag touched his head.
'Ah,' Granger smiled and nodded.

Oskar Sandberg
[EMAIL PROTECTED]

_______________________________________________
Freenet-dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/freenet-dev

Reply via email to