I am doing some very nasty computation using java but it always gives me a java.lang.OutOfMemory Error,after this nothing on the GUI works.i think its ok to have that error but atleast things should work afterwards.

Please Advise

Recommended Answers

All 3 Replies

I am doing some very nasty computation using java but it always gives me a java.lang.OutOfMemory Error,after this nothing on the GUI works.i think its ok to have that error but atleast things should work afterwards.

Please Advise

It's not okay to have that exception. My "Please Advise" is that you post code so we can at least see what you're trying to do.

Unless you're loading large amounts of data into memory (i.e. more than will fit in the memory allocated to the VM), this shouldn't happen. A common cause of this problem is some sort of out-of-control recursion. Try running your code with some sort of stack trace enabled so you can find at what point in your code the exception is being raised.

--sg

Hey sani,

What does this code do? are you doing lots of I/O? or creating many objects?

Ed

OOPs ! one of so many loops in my code was not terminating n it was consistantly writing into the memory :o . Thanks for the help fellas.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.