]> Repositories - hackapet/Adafruit_Blinka.git/blobdiff - python/board/__init__.py
Introduced conservative garbage collection to minimise heap fragmentation
[hackapet/Adafruit_Blinka.git] / python / board / __init__.py
index b5d65c7fb960621a6cf4048fe93a4ae572fd22d1..b42d0133869b3cf6b13f182f9b90e81b9bbf5834 100644 (file)
@@ -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