Is there a way to detect memory leaks of an application using python, like valgrind does

Viewed 16

Usually when I want to check if an application has memory leaks, I use valgrind. But, is there a possible way that Python can be used for the same intention? Is there any Python module which does the same job as valgrind.

I know that pstuil exist using:

for proc in psutil.process_iter():
    if "app" in proc.name():
       memory = proc.memory_info().rss

But it is not what I want. I want something similar to valgrind but using Python.

0 Answers
Related