On Tue, Sep 4, 2012 at 3:28 PM, Anssi Kääriäinen
<[email protected]> wrote:
> I did some digging, and the reason for the error is this line in the
> patch:
>     self.cursor.outputtypehandler = self._outputtypehandler
>
> What is happening is that self has a reference to self.cursor, which
> has reference to bound method self._outputtypehandler, which has a
> reference to self. Thus, there is a reference loop, and garbage
> collection is delayed. Changing the _outputtypehandler to @classmethod
> seems to solve this problem.

Thanks for tracking that down.  _rowfactory was a module-level
function rather than a method, and I should have left it that way.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to