Concatenate method of pdfFileEditor is concatenating files properly but not releasing the memory. I verified this using Task Manager and the memory gets freed up only after the application gets terminated.
Here is the code snippett:
string[] inputstream = new string[flag];
int counter = 0;
foreach (string fileName in inputArray)
{
inputstream[counter] = fileName;
counter = counter + 1;
}
concatenatepdf = Path.Combine(path, "concatenatepdf.pdf");
tempFile = Path.Combine(path, "tempFile.pdf");
//outputPdf = Path.Combine(path, "mergedPdf.pdf"); Outputfile
//string date = DateTime.Now.Date.ToString() ;
//string time = DateTime.Now.TimeOfDay.ToString() ;
//string outputfileName = "Outputfile" + date + time;
outputPdf = Path.Combine(dirpath, "Outputfile.pdf");
PdfFileEditor pdfEditor = new PdfFileEditor();
pdfEditor.Concatenate (inputstream, concatenatepdf);
pdfEditor = null;