﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
34865	DatabaseWrapper are not GC and connections are not closed	Fábio Domingues	Priyank Panchal	"I have found possible memory leak when investigating why database connections where not closed after the thread/coroutine ended (https://code.djangoproject.com/ticket/33497 and https://github.com/django/django/pull/17275), the `DatabaseWrapper` ends up in a circular reference with `DatabaseFeatures`/`DatabaseCreation`/`DatabaseClient`/... and the GC could not cleanup the objects.
I tryed use `WeakRef` from the ""child"" objects to the wrapper or deleting the `__dict__` and the wrapper was collected and the connections was closed.
"	Bug	closed	Database layer (models, ORM)	dev	Normal	fixed		Carlton Gibson Andrew Godwin David Wobrock Florian Apolloner	Ready for checkin	1	0	0	0	0	0
