micropython/examples/natmod
Damien George 73c58150f5 extmod/modbtree: Retain reference to underlying stream so it's not GC'd.
For ports that have a system malloc which is not garbage collected (eg
unix, esp32), the stream object for the DB must be retained separately to
prevent it from being reclaimed by the MicroPython GC (because the
berkeley-db library uses malloc to allocate the DB structure which stores
the only reference to the stream).

Although in some cases the user code will explicitly retain a reference to
the underlying stream because it needs to call close() on it, this is not
always the case, eg in cases where the DB is intended to live forever.

Fixes issue #5940.
2020-05-02 16:08:04 +10:00
..
btree extmod/modbtree: Retain reference to underlying stream so it's not GC'd. 2020-05-02 16:08:04 +10:00
features0 examples/natmod: Add very simple features0 example to compute factorial. 2019-12-19 17:06:27 +11:00
features1 all: Use MP_ERROR_TEXT for all error messages. 2020-04-05 15:02:06 +10:00
features2 all: Use MP_ERROR_TEXT for all error messages. 2020-04-05 15:02:06 +10:00
framebuf py/dynruntime.mk: Set MICROPY_ENABLE_DYNRUNTIME instead of per module. 2020-04-05 14:13:02 +10:00
uheapq py/dynruntime.mk: Set MICROPY_ENABLE_DYNRUNTIME instead of per module. 2020-04-05 14:13:02 +10:00
urandom py/dynruntime.mk: Set MICROPY_ENABLE_DYNRUNTIME instead of per module. 2020-04-05 14:13:02 +10:00
ure all: Use MP_ERROR_TEXT for all error messages. 2020-04-05 15:02:06 +10:00
uzlib py/dynruntime.mk: Set MICROPY_ENABLE_DYNRUNTIME instead of per module. 2020-04-05 14:13:02 +10:00
.gitignore examples/natmod: Add .gitignore to ignore generated example .mpy files. 2020-03-03 12:54:17 +11:00