Fix #271
authorDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Tue, 31 Mar 2009 21:07:13 +0000 (23:07 +0200)
committerDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Tue, 31 Mar 2009 21:07:13 +0000 (23:07 +0200)
Cython/Compiler/ModuleNode.py

index 21c62a8e296dfb61c56654e3ce5d6c28ff099925..b7dc076b3e32fbd2fda1c91727ad8ffd06e914da 100644 (file)
@@ -1658,6 +1658,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
         code.put_goto(code.return_label)
         code.put_label(code.error_label)
         code.put_var_xdecrefs(env.temp_entries)
+        for cname, type in code.funcstate.all_managed_temps():
+            code.put_xdecref(cname, type)
         code.putln('__Pyx_AddTraceback("%s");' % env.qualified_name)
         env.use_utility_code(Nodes.traceback_utility_code)
         code.put_decref_clear(env.module_cname, py_object_type, nanny=False)