Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak in Quick.Process.GetProcessList #58

Closed
PeterPanino opened this issue Dec 24, 2020 · 1 comment
Closed

Memory leak in Quick.Process.GetProcessList #58

PeterPanino opened this issue Dec 24, 2020 · 1 comment

Comments

@PeterPanino
Copy link

PeterPanino commented Dec 24, 2020

Quick.Process.GetProcessList creates a memory leak.

To avoid a memory-leak, implement a var parameter for an existing StringList, for example:

procedure GetProcessList (var MyStringList: TStringList);

This would allow freeing the String-List manually after use.

@exilon
Copy link
Owner

exilon commented Jan 1, 2021

GetProcessList doesn't creates a memory leak. It returns a TStringList and you must free after use. If you pass a var, you need to free also:

list := GetProcessList
try
  ..your code
finally
  list.Free;
end;

@exilon exilon closed this as completed Jan 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants