good memory managment
I'm tryign to find the rootcause for my memory consuming program.
My basic data structure is "SpcVarVal" :
"SpcVarType" class contains string ( name ) and also some flags.
public class SpcVarVal
private String val;
private SpcVarType varType;
// from here is the constructor and methods
The SpcVarType objects are created in the begining of the program and remains constant.
The SpcVarVal objects are dynamic - created and removed very often.
because the link to SpcVarType - they are not deleted ?
Yes they are garbage collected, unless something else contains a reference to them. Them containing a reference to something else is irrelevant.