ORM System.OutOfMemoryException

Hi,
when I try to process 50 images by looping, i get System.OutOfMemoryException. how to resolve this?
my code snippet is :
For Each fi In arryFiles
Dim RecognitionResult As RecognitionResult = TemplateProcessor.Recognize(fi.FullName, 50)
Dim result As String = RecognitionResult.GetCsv()
//then save result in txt file
next.

Regards,

@cne

Can you please share your sample .omr template and images with us? We will test the scenario in our environment and address it accordingly.

this was resolved by using a thread.

regard.