From 81bfd84f5eadaf4ee9bae4491239ed4a5ce9cd47 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Thu, 3 Sep 2009 18:00:11 +0200 Subject: Really fix the problem of keeping all pgen2 parser nodes in memory. --- sphinx/pycode/__init__.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sphinx/pycode') diff --git a/sphinx/pycode/__init__.py b/sphinx/pycode/__init__.py index 1187b6a4..fa8d0e94 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 -- cgit v1.2.1