micropython/examples
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
..
SDdatalogger all: Reformat C and Python source code with tools/codeformat.py. 2020-02-28 10:33:03 +11:00
bluetooth examples/bluetooth: Replace "connectable" parameter with "adv_type". 2020-03-12 10:58:08 +11:00
embedding all: Fix auto-enable of MICROPY_GCREGS_SETJMP to select GC behaviour. 2020-04-30 16:49:42 +10:00
hwapi all: Reformat C and Python source code with tools/codeformat.py. 2020-02-28 10:33:03 +11:00
natmod extmod/modbtree: Retain reference to underlying stream so it's not GC'd. 2020-05-02 16:08:04 +10:00
network all: Reformat C and Python source code with tools/codeformat.py. 2020-02-28 10:33:03 +11:00
unix all: Reformat C and Python source code with tools/codeformat.py. 2020-02-28 10:33:03 +11:00
accel_i2c.py all: Reformat C and Python source code with tools/codeformat.py. 2020-02-28 10:33:03 +11:00
accellog.py all: Reformat C and Python source code with tools/codeformat.py. 2020-02-28 10:33:03 +11:00
asmled.py all: Reformat C and Python source code with tools/codeformat.py. 2020-02-28 10:33:03 +11:00
asmsum.py all: Reformat C and Python source code with tools/codeformat.py. 2020-02-28 10:33:03 +11:00
conwaylife.py all: Reformat C and Python source code with tools/codeformat.py. 2020-02-28 10:33:03 +11:00
ledangle.py all: Reformat C and Python source code with tools/codeformat.py. 2020-02-28 10:33:03 +11:00
mandel.py all: Reformat C and Python source code with tools/codeformat.py. 2020-02-28 10:33:03 +11:00
micropython.py all: Reformat C and Python source code with tools/codeformat.py. 2020-02-28 10:33:03 +11:00
pins.py all: Reformat C and Python source code with tools/codeformat.py. 2020-02-28 10:33:03 +11:00
pyb.py all: Reformat C and Python source code with tools/codeformat.py. 2020-02-28 10:33:03 +11:00
switch.py all: Reformat C and Python source code with tools/codeformat.py. 2020-02-28 10:33:03 +11:00