David Muller

Greenhorn
+ Follow
since Dec 08, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by David Muller

Thanks for taking the time to reply.
My program doesn't store all the fetched pages, just a select few, and I encountered the same problem when I ran it without storing anything, so the problem is definitely in this method.
What exactly do you mean by cleaning up references, setting them to null when I'm done with them? Shouldn't this be done automatically by garbage collection?
14 years ago
So I made a simple Web crawler which works very well until at some point after fetching a few hundred pages causes an OutOfMemoryError. More specifically, the next() method of a scanner object does so. I've tried everything from forcing garbage collection to shaking my laptop pretty hard to make it work, but I just couldn't figure it out, but I'm sure it's something pretty stupid.
I would be immensely thankful if someone could help me with this and pay this person a virtual beer.

Here's the piece of code that doesn't work:


14 years ago