From da9bd662e005ef09179c8f4cbb0dadaac132a102 Mon Sep 17 00:00:00 2001 From: Cefn Hoile Date: Tue, 20 Feb 2018 17:10:20 +0000 Subject: [PATCH] Introduced conservative garbage collection to minimise heap fragmentation --- python/board/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/board/__init__.py b/python/board/__init__.py index b5d65c7..b42d013 100644 --- a/python/board/__init__.py +++ b/python/board/__init__.py @@ -28,8 +28,11 @@ platform introspection * Author(s): cefn """ +import gc import sys +gc.collect() from agnostic import board +gc.collect() __version__ = "0.0.0-auto.0" __repo__ = "https://github.com/adafruit/Adafruit_Micropython_Blinka.git" @@ -44,4 +47,5 @@ elif board == "nodemcu": elif board == "pyboard": from board.pyboard import * else: - raise NotImplementedError("Board not supported") \ No newline at end of file + raise NotImplementedError("Board not supported") +gc.collect() \ No newline at end of file -- 2.49.0