Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/sage/repl/ipython_kernel/interact.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,16 @@ def __repr__(self):
for w in widgets:
s += "\n %s: %s" % (w._kwarg, w)
return s

def update(self, *args, **kwargs):
"""
Override update to force garbage collection after each call.
"""
import gc
try:
super().update(*args, **kwargs)
finally:
gc.collect()

def signature(self):
"""
Return the fixed signature of the interactive function (after
Expand Down
Loading