summaryrefslogtreecommitdiff
path: root/py/gc.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/gc.c')
-rw-r--r--py/gc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/py/gc.c b/py/gc.c
index ba5c569d5..ad3e11040 100644
--- a/py/gc.c
+++ b/py/gc.c
@@ -746,7 +746,9 @@ void *gc_alloc_with_finaliser(mp_uint_t n_bytes) {
// TODO: freeing here does not call finaliser
void gc_free(void *ptr) {
if (MP_STATE_THREAD(gc_lock_depth) > 0) {
- // TODO how to deal with this error?
+ // Cannot free while the GC is locked. However free is an optimisation
+ // to reclaim the memory immediately, this means it will now be left
+ // until the next collection.
return;
}