Possible memoryleak

About task

From the unit uParallelLetterFrequency.pas a method that has a class method that return a dictionary.

class function TParallelLetterFrequency.Calculate(const aInputLetters: string): TDictionary<char, integer>;
begin

end;

The dictionary must be created but where is the memory freed ?
I suspect this is a memleak

@bero thanks for your post.

@ErikSchierboom - Who is the relevant maintainer for this track who could take a look?

It’s @rpottsoh.

Looks like Actual and Expected dictionaries need to be added to the Private section of class ParallelLetterFrequencyTests and their respective declarations removed from each test case.

Setup and TearDown methods would also need to be added to the public section. Setup would instantiate Expected TDictionary and TearDown would free Actual and Expected.

If anyone is willing to open a PR to make this change to uParallelLetterFrequencyTests.pas I would appreciate it.

1 Like

I made a pull request today but it was rejected with this message.

Hello. Thanks for opening a PR on Exercism. We are currently in a phase of our journey where we have paused community contributions to allow us to take a breather and redesign our community model. You can learn more in this blog post. As such, all issues and PRs in this repository are being automatically closed.