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

Manually calling gc.collect is not recommended #692

Closed
Kain-90 opened this issue Aug 14, 2024 · 1 comment
Closed

Manually calling gc.collect is not recommended #692

Kain-90 opened this issue Aug 14, 2024 · 1 comment
Assignees

Comments

@Kain-90
Copy link
Contributor

Kain-90 commented Aug 14, 2024

Referring to the link below, I learned that and previously had never manually called gc.collect() in Python code before.

https://stackoverflow.com/questions/26761784/where-to-call-gc-collect

@Kain-90 Kain-90 changed the title Why is garbage collection manually invoked in each endpoint Manually calling gc.collect is not recommended Aug 14, 2024
@praveshkumar1988
Copy link
Contributor

In some case like long-running processes that handle large amounts of data, memory might not be freed quickly enough, leading to memory bloat. So need to manually calling gc.collect() that can help manage memory more proactively.

@Kain-90 Kain-90 closed this as completed Aug 15, 2024
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