fix(keys): force gc collection in keys setup to reduce memory fragmentation, probably at cost of performance

This commit is contained in:
Josh Klar 2021-06-19 19:18:25 -07:00
parent 6f8eb425b1
commit aeee945728
No known key found for this signature in database
GPG Key ID: A4A0C7B4E8EEE222

View File

@ -1,3 +1,4 @@
import gc
from micropython import const
import kmk.handlers.stock as handlers
@ -804,6 +805,8 @@ def make_key(code=None, names=tuple(), type=KEY_SIMPLE, **kwargs): # NOQA
register_key_names(key, names)
gc.collect()
return key