P
Patricia Shanahan
....Sal said:Ehm... now i think that you are right.
Yes I ran it for two hour and the memory grows up to 15.824 KB (Task
Manager Windows)
Yes I've to look in another place the problem of my memory error
(probably a memory leak , but i'm not a specialist i written this
program day by day not looking to the correct code but looking to make
it runs.
Now i have a program of 1300 lines of graphical interface and many
more to control it and i don't know where i have to look!
I need a tool that help me to find the problem, can you advice me a
freeware one?
Maybe it is time for some refactoring, with the objective of making the
program cleaner and easier to decompose, as well as ensuring all GUI
work is done in the event handling thread.
It is entirely possible that the refactoring will itself remove the
problem. If it does not, you will have a better base for SSCCE
construction. The SSCCE approach can be a good way of tracking down
problems, even if you never post them to a newsgroup. The idea is to
progressively simplify the program, removing everything that is not
essential to reproducing the bug.
In your case, the test should be whether you get an OutOfMemoryError if
you run the program with -Xmx set to a reasonable value. Any time you
remove something, and the bug goes away, you have a new clue about what
is going wrong.
Patricia