summaryrefslogtreecommitdiff
path: root/py/gc.h
diff options
context:
space:
mode:
authorScott Shawcroft <scott@tannewt.org>2019-04-08 16:58:50 -0700
committerScott Shawcroft <scott@tannewt.org>2019-04-08 16:58:50 -0700
commit0f003ac5b8312fafb120e86e05eefd2431014d8c (patch)
treeed3e9cd062573c0f0f7fcea51f7c4e9971319648 /py/gc.h
parent7686f93ef456aa46f538da3159d0e12cae9fa737 (diff)
Reorganize board busses into shared-bindings and shared-module.
Diffstat (limited to 'py/gc.h')
-rw-r--r--py/gc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/py/gc.h b/py/gc.h
index c05e006b4..757a2a6e0 100644
--- a/py/gc.h
+++ b/py/gc.h
@@ -57,6 +57,10 @@ bool gc_has_finaliser(const void *ptr);
void *gc_make_long_lived(void *old_ptr);
void *gc_realloc(void *ptr, size_t n_bytes, bool allow_move);
+// Prevents a pointer from ever being freed because it establishes a permanent reference to it. Use
+// very sparingly because it can leak memory.
+bool gc_never_free(void *ptr);
+
typedef struct _gc_info_t {
size_t total;
size_t used;