]> granicus.if.org Git - python/commit
bpo-32710: Fix _overlapped.Overlapped memory leaks (GH-11489)
authorVictor Stinner <vstinner@redhat.com>
Fri, 11 Jan 2019 13:35:14 +0000 (14:35 +0100)
committerGitHub <noreply@github.com>
Fri, 11 Jan 2019 13:35:14 +0000 (14:35 +0100)
commit5485085b324a45307c1ff4ec7d85b5998d7d5e0d
treea1183c6a4bec97b23d427ed6425603e3db5ff4c2
parentfd7d539be3ce1cc098a4f104b7a7816ca00add16
bpo-32710: Fix _overlapped.Overlapped memory leaks (GH-11489)

Fix memory leaks in asyncio ProactorEventLoop on overlapped operation
failures.

Changes:

* Implement the tp_traverse slot in the _overlapped.Overlapped type
  to help to break reference cycles and identify referrers in the
  garbage collector.
* Always clear overlapped on failure: not only set type to
  TYPE_NOT_STARTED, but release also resources.
Misc/NEWS.d/next/Library/2019-01-10-15-55-10.bpo-32710.KwECPu.rst [new file with mode: 0644]
Modules/overlapped.c