tags. That way it'll format nicely. But your post seems to be about memory management. Java handles that automatically, and it does that very well. You're basically wasting time looking at the task manager and checking what System.freeMemory() returns. You need to worry about memory management when you run out of memory. If you're new to Java, you should learn the basic things in the tutorials and leave the advanced topics for later. As for your Vector problems (ArrayList is more popular these days, Vector is kinda outdated). You can't add a String array to a Vector<String>. You also didn't fill your String array with any Strings, so you have an empty array. I recommend you to go through the tutorials, and if you have a problem with them (or are uncertain about something) then ask: http://docs.oracle.com/javase/tutorial/
992686 wrote:Edit your post and use the
Hmm, sorry... the format and some bytes were lost between copy and paste.
tags to format the code.And what does happen when I remove them while nobody holding references?If nobody has references to the objects, the garbage collector will collect them. Just putting them in an ArrayList won't lose them, the ArrayList will still have references to the objects.tried also to build dynamic array myself but having problems with memory managmentNo, you have no problems with memory management.cant get back to the amount of startup, even backwards does not work...That's because you're trying to do irrelevant things. Basically you're wasting your time.Maybe I should trie interface building object?No, you should learn the basics of Java by going through the tutorials.Have fun there.Thanks, you too!