I have an application that generates a list of all fingerprint images in a selected folder, then goes down the list comparing each fingerprint and returns a score for each match.
The first thing it does is generate an Array List of all the files. It opens the first file and copies the data into a byte array, opens the second file and does the same. Then it calls getScore(byte array 1, byte array 2). getScore() calls various functions of our fingerprint matching API and returns an integer score. the score and file names of the files compared gets written to a text file. It does that for every file from index 1 to N where N is the total number of files. It then removes element 0 in the array. The new element 0 gets read and so forth until it gets a score for every comparison, repeat.
I do a Dispose() on every stream after it's used and I set the byte arrays to null after the score is returned. Should I be doing anything else as I keep getting out of memory exceptions I tried adding GC.Collect() but that just causes it to crash after a while.