Creation of weakref in Browser.__init__() increfs self with callback argument
Bug #646077 reported by
Gavin Panella
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Triaged
|
Low
|
Unassigned |
Bug Description
The following code in c.l.testing.
the reference count to self by 1 because of the self._refclose
argument to weakref.ref():
_live_
I don't think it matters too much because the browsers are cleaned up
in tearDown(), so this might not be worth fixing.
However, one possible fix might be to add the following function
(which might have to be global):
def browser_
return lambda ref: close()
and change the creation of the weakref:
_live_
weakref.
To post a comment you must log in.
It does sound like this is either over- or under-engineered. :-)