BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Well, I refactored some of the methods and the memory leak ended up being the cause. Lesson learned: using statements are your friends.
To be a little more specific, I just created a file as a destination for the PDF, then called
using (Stream s = new FileStream(/*string*/>f.Path, FileMode.OpenOrCreate))
{
await Task.Run(() => SaveAsPdf(/*StorageFile*/f, /*Manga*/m));
}
Various other things needed to be moved around, but leaving the FileStream open ended up being the problem.
I guess the memory leak wasn't unrelated at all.