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>
This commit is contained in:
parent
cb0a8f2ed9
commit
cd23c95760
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue