summaryrefslogtreecommitdiff
path: root/sphinx/pycode/__init__.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-09-03 18:00:11 +0200
committerGeorg Brandl <georg@python.org>2009-09-03 18:00:11 +0200
commite9fc8d890ce568d279e40da28f6b2f3d3f3ee75f (patch)
treefdcf452e1e58df86a3cfa6230284098916f22f15 /sphinx/pycode/__init__.py
parenteff2bdd5151573287e226b6d5ad75b133a738d91 (diff)
downloadsphinx-git-e9fc8d890ce568d279e40da28f6b2f3d3f3ee75f.tar.gz
Really fix the problem of keeping all pgen2 parser nodes in memory.
Diffstat (limited to 'sphinx/pycode/__init__.py')
-rw-r--r--sphinx/pycode/__init__.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/sphinx/pycode/__init__.py b/sphinx/pycode/__init__.py
index 1187b6a43..fa8d0e948 100644
--- a/sphinx/pycode/__init__.py
+++ b/sphinx/pycode/__init__.py
@@ -234,6 +234,8 @@ class ModuleAnalyzer(object):
attr_visitor = AttrDocVisitor(number2name, scope, self.encoding)
attr_visitor.visit(self.parsetree)
self.attr_docs = attr_visitor.collected
+ # now that we found everything we could in the tree, throw it away
+ # (it takes quite a bit of memory for large modules)
self.parsetree = None
return attr_visitor.collected