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

[361 byte] By [Programersa] at [2007-11-27 0:32:39]
# 1
Well, you must do something incorrectly then, and don't release unneeded resources. It also sounds like you have an endless loop somewhere if your PC gets stuck with full CPU load.
CeciNEstPasUnProgrammeura at 2007-7-11 22:38:33 > top of Java-index,Java Essentials,Java Programming...
# 2
NO THE PROBLEM ISN'T CPU BUT VIRTUAL MEMORYI 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
Programersa at 2007-7-11 22:38:33 > top of Java-index,Java Essentials,Java Programming...
# 3

> 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

sim085a at 2007-7-11 22:38:33 > top of Java-index,Java Essentials,Java Programming...
# 4

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.>

subhaja at 2007-7-11 22:38:33 > top of Java-index,Java Essentials,Java Programming...