summaryrefslogtreecommitdiff
path: root/shared-module/struct
diff options
context:
space:
mode:
authorJeff Epler <jepler@gmail.com>2019-11-25 09:53:55 -0600
committerJeff Epler <jepler@gmail.com>2019-11-25 09:53:55 -0600
commit5115fdaa6f651ae4e1236e5cf7194438fe1c0533 (patch)
treeda9ef7a7260ddf31ac95c983e7ba412d30fec90f /shared-module/struct
parent1c6c9a3e1f041670c008e719be635f4205add6e9 (diff)
shared-bindings: I2SOut: Ensure object is deinitialised
(or deinitialized, for those of us on this side of the pond) Otherwise, a sequence like ``` audio = audiobusio.I2SOut(bit_clock=board.D6, word_select=board.D9, data=board.D10) sine_wave_sample = audiocore.RawSample(sine_wave) audio.play(sine_wave_sample, loop=True) del audio ``` could free the memory associated with audio without stopping the related background task. Later, when fresh objects are allocated within a now-freed memory region, they can get overwritten in the background task, leading to a hard crash. This presumably can affect multiple I2S implementations, but it was reported against the nRF one.
Diffstat (limited to 'shared-module/struct')
0 files changed, 0 insertions, 0 deletions