My project occupy high virtual memory
Hi all
I prepared a project on java and it works excellent. But the problem is that every button I click for example or every page I move the virtual memory (RAM) get increasing until the computer get stock (I see this at taks manager). And the computer doesn抰 respond. Then I need to restart it again.
Any Idea?
Thanks a lot.
bye
> NO THE PROBLEM ISN'T CPU BUT VIRTUAL MEMORY
> I CHECK THE VIRTUAL MEMORY IN EVERY ACTION. IF I
> CLOSE E FRAME AND OPEN ANOTHER ONE IT GET INCREASE
> AND SO ON.
> OF COURSE I USED SYSTEM.GC ON EVERY EXIT OF FRAME BUT
> IT DIDN'T WORK
1. Shouting will get you nowhere!
2. It means you are not properly disposing of the frames you are closing.
Regards,
Sim085
hey,
it is true that JVM uses high memory when it runs on. but you can reduce the memory easily. Try this:
1>use local scope variable when necessairy
2>try use static variable if a value is used by many objects.
3>try to Null-ify a variable when it is not in use.
4>sequentially run garbage collector (System.gc()) <all though this will not work good.>