diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2020-09-16 23:15:00 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2020-09-16 23:53:45 -0400 |
commit | cd23c95760e0fb1dbb5af5f2aa07667a2228a869 (patch) | |
tree | 8369fb16a12995bc349422d157290925e83c63fc /klippy/extras/display | |
parent | cb0a8f2ed9d5895e7b07a3783f00205f33e23203 (diff) | |
download | kutter-cd23c95760e0fb1dbb5af5f2aa07667a2228a869.tar.gz kutter-cd23c95760e0fb1dbb5af5f2aa07667a2228a869.tar.xz kutter-cd23c95760e0fb1dbb5af5f2aa07667a2228a869.zip |
display: Remove circular references from intermediate context object
Explicilty clear the local context object so that it does not require
a gc sweep to free it.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/display')
-rw-r--r-- | klippy/extras/display/display.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/klippy/extras/display/display.py b/klippy/extras/display/display.py index 38a95cf4..d3db32a3 100644 --- a/klippy/extras/display/display.py +++ b/klippy/extras/display/display.py @@ -79,6 +79,7 @@ class DisplayGroup: for row, col, template in self.data_items: text = template.render(context) display.draw_text(row, col, text.replace('\n', ''), eventtime) + context.clear() # Remove circular references for better gc class PrinterLCD: def __init__(self, config): |