Skip to content
Snippets Groups Projects
Commit 0f9cab06 authored by Jared Hancock's avatar Jared Hancock
Browse files

queryset: Fix circular reference error

This fixes an error where the ModelInstanceManager maintained a reference to
the QuerySet instance, and the QuerySet instance managed a reference to the
ModelInstanceManager instance (if it's the iterator for the query). Because
of the circular reference, if the iterator is not exhausted, then the
resource is not closed and the query remains open. This wastes memory and
prevents some other queries from running after such a situation happens.

This addresses the issue by removing the circular reference between the
QuerySet and the ModelInstanceManager.
parent 1f9de0f2
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment