ObjectOutputStream oos = new ObjectOutputStream(...);
...
write lots of objects to the ObjectOutputStream.
...
get OutOfMemory exception :-(.
ObjectOutputStream keeps a record of every object it has seen, and thus prevents the object from being garbage-collected, even when you ARE done with it.
...
write lots of objects to the ObjectOutputStream.
...
get OutOfMemory exception :-(.
ObjectOutputStream keeps a record of every object it has seen, and thus prevents the object from being garbage-collected, even when you ARE done with it.
(no subject)
Date: 2005-03-30 08:52 am (UTC)