> On 21 Jul 2022, at 21:54, Marco Sulla <marco.sulla.pyt...@gmail.com> wrote:
> On Thu, 21 Jul 2022 at 22:28, MRAB <pyt...@mrabarnett.plus.com> wrote:
>> 
>> It's something to do with pickling iterators because it still occurs
>> when I reduce func_76 to:
>> 
>> @trace
>> def func_76():
>>     pickle.dumps(iter([]))
> 
> It's too strange. I found a bunch of true memory leaks with this
> decorator. It seems to be reliable. It's correct with pickle and with
> iter, but not when pickling iters.

With code as complex as python’s there will be memory allocations that occur 
that will not be directly related to the python code you test.

To put it another way there is noise in your memory allocation signal.

Usually the signal of a memory leak is very clear, as you noticed.

For rare leaks I would use a tool like valgrind.

Barry

> -- 
> https://mail.python.org/mailman/listinfo/python-list

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to