We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f38a07c commit 2858dacCopy full SHA for 2858dac
shared-module/_protomatter/Protomatter.c
@@ -163,7 +163,14 @@ void common_hal_protomatter_protomatter_deinit(protomatter_protomatter_obj_t* se
163
}
164
memset(&self->core, 0, sizeof(self->core));
165
166
+ // If it was supervisor-allocated, it is supervisor-freed and the pointer
167
+ // is zeroed, otherwise the pointer is just zeroed
168
+ _PM_FREE(self->bufinfo.buf);
169
self->base.type = NULL;
170
+
171
+ // If a framebuffer was passed in to the constructor, NULL the reference
172
+ // here so that it will become GC'able
173
+ self->framebuffer = NULL;
174
175
176
void protomatter_protomatter_collect_ptrs(protomatter_protomatter_obj_t* self) {
0 commit comments