I wrote an algorithm to detect my crystals (circle shape) which have imperfect edges. Since,I don't know how many crystals will appear in my system I had to go for a safe estimation (which was 100 crystals). So, I defined pictureboxes array and bitmap arrays as follow:
public PictureBox[] segment = new PictureBox[100];
public Bitmap[] cropped = new Bitmap[100];
when the algorithm is done. I can run a loop to count the number of crystals (which equals to sum of non null member of cropped or segment array above). To make the program better I was wondering if I can Dispose/truncate these two arrays.