growing python process memory over time

后端 未结 2 1526
情书的邮戳
情书的邮戳 2020-12-31 16:44

My python code process memory increases dynamically as it stores dynamic data in list, dictionary and tuples wherever necessary. Though all those dynamic data is cleared phy

2条回答
  •  轮回少年
    2020-12-31 17:03

    How big are we talking? Python itself takes up some amount of memory.. up to maybe 30 or 40 MB I believe. If it is bigger than that and not getting collected, you have a memory leak. Only garbage with no references can be collected, somehow your extra stuff is still referenced. Do a memory profile and see what is going on.

提交回复
热议问题