This content has been marked as final. Show 6 replies
java.lang.System.gc() might be be helpful for clearing the garbage manually.
There are some things you must consider before making game on javafx 1.3 like:
Initially loading the images and save them in def instead of 'var'. The game object must be light enough but must be cool. Use the effect, strokes only when essential. To preserve your memory and fast execution of object the cache is helpful property. Most fast animation,dragging time usually don't need any effects on object.
Thanks for the good tips. I'll look into all of them. Never heard of the cache property in javafx.
I already do the loading of images at the beginning, albeit they are vars not def's (going to change that). I'm going to have a loading screen so the player can see that things are loading. I also keep effects down to a minimum, they hardly get used.
The System.gc call does not seem to lower the memory. My tests show the same memory usage after calling it at the end of each round. Any ideas? I did not want to cache the enemy units, as there are going to be many of them. A simple question is this, if an object is added to a javafx sequence and the object is removed from that sequence using "delete", is a reference kept for that object?