mirror of
https://github.com/sascha-hemi/pycom-documentation.git
synced 2026-03-21 14:06:17 +01:00
31 lines
584 B
Markdown
31 lines
584 B
Markdown
---
|
|
title: "gc"
|
|
aliases:
|
|
- firmwareapi/micropython/gc.html
|
|
- firmwareapi/micropython/gc.md
|
|
- chapter/firmwareapi/micropython/gc
|
|
---
|
|
|
|
## Methods
|
|
|
|
#### gc.enable()
|
|
|
|
Enable automatic garbage collection.
|
|
|
|
#### gc.disable()
|
|
|
|
Disable automatic garbage collection. Heap memory can still be allocated, and garbage collection can still be initiated manually using `gc.collect()`.
|
|
|
|
#### gc.collect()
|
|
|
|
Run a garbage collection.
|
|
|
|
#### gc.mem\_alloc()
|
|
|
|
Return the number of bytes of heap RAM that are allocated.
|
|
|
|
#### gc.mem\_free()
|
|
|
|
Return the number of bytes of available heap RAM.
|
|
|