scipy/scipy — pull request #3968 by pv (2014-09-04 19:29:13+00:00)
Title: BUG: sparse.linalg: make *Inv objects in arpack garbage-collectable by refcount

Setting self._method = self._method by passing self._method to
LinearOperator causes a reference cycle in the various inverse
operators. self._method = Class._method works.

The reference cycle prevents these objects from being GC'd immediately
by refcount. Since these objects hold large amounts of data, it's easy
to run out of memory before cyclic GC runs, if eigs/eigsh is called in a
tight loop, so it's best to not create refcycles here.

(Issue spotted from a post on stackoverflow)