summaryrefslogtreecommitdiff
path: root/data/themes/dark.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2014-04-27 21:33:00 +0200
committermathieui <mathieui@mathieui.net>2014-04-27 21:38:29 +0200
commit3fb3d8db3d566f231ea6ff6afd559a0185d8bff7 (patch)
treecb4d084f003401c4403e602d39c0333361fae23d /data/themes/dark.py
parent5999b71c416f02dc11803bf52a406b9109ddc3c1 (diff)
downloadpoezio-3fb3d8db3d566f231ea6ff6afd559a0185d8bff7.tar.gz
poezio-3fb3d8db3d566f231ea6ff6afd559a0185d8bff7.tar.bz2
poezio-3fb3d8db3d566f231ea6ff6afd559a0185d8bff7.tar.xz
poezio-3fb3d8db3d566f231ea6ff6afd559a0185d8bff7.zip
Fix memleaks in pooptmodule.cut_text (ref #1914)
- we need to decrement the refcount after giving the tuple to the retlist in order to transfer ownership The example script below will quickly take gigabytes of ram with the old module, while the new will not take noticeably more memory. The leak is not very visible on launch, because we “only” leaked each tuple returned, and (int, int) is not heavy. However, after weeks of use and many messages, the memory still isn’t freed and it shows. import poopt import gc a = 'coucouco ' * 1000 for i in range(100000): if not (i % 10000): print(i) poopt.cut_text(a, 50)
Diffstat (limited to 'data/themes/dark.py')
0 files changed, 0 insertions, 0 deletions