So I have an object which needs certain variables to be instantiated. These variables are passed to the object through an array of objects. Then, each element in the array gets assigned to an internal variable.
Does this array get garbage collected after the internal variables are assigned and the array is never referenced again, or should it be manually done?
class MyObject () {
public static Object [] values;
public void setvalues(inputArray) {
values = inputArray;
}
}
Memory is kind of important because I need to create a few hundred of these objects plus the rest of the code.