I'll try and simplify this so that you understand why I'm asking the question...
I am working with a VERY VERY large data set (345600 lines w/ x,y,z coordinates on each line). I have 2 arrays of this size that are created by reading in a file containing them.
I have to separate the data in the main method (every other line goes to either array) and then I create two different objects (from different classes) one for each array (position and velocity). I instantiate each object by using the arrays that I just made as an argument.
here's the question though. .... once i create the 2 objects (1 position, 1 velocity) I don't need the static arrays that are taking up space in the main method. can I just delete them to free up the space
now.. if that isn't clear enough.. try this...
[dataset]
x1,y1,z1
vx1,vy1,vz1
x2,y2,z2
vx2,vy2,vz2
.
.
.
xn,yn,zn
vxn,vyn,vzn
I create two static arrays in my main method
[position array]
x1,y1,z1
x2,y2,z2
........
[velocity array]
vx1,vy1,vz1
vx2,vy2,vz2
......
I create to objects (in the main method) using [position array],[velocity array].
POSobj, VELobj.
Now I no longer need the original two static arrays [pos_ary],[vel_ary] once the objects are created. Furthermore, since they are huge arrays, I'd rather just free up the memory that they are using.
so.... suggestions??
thanks
-Z