diff options
| author | Jeff Epler <jepler@gmail.com> | 2019-11-25 09:53:55 -0600 |
|---|---|---|
| committer | Jeff Epler <jepler@gmail.com> | 2019-11-25 09:53:55 -0600 |
| commit | 5115fdaa6f651ae4e1236e5cf7194438fe1c0533 (patch) | |
| tree | da9ef7a7260ddf31ac95c983e7ba412d30fec90f /shared-module/struct | |
| parent | 1c6c9a3e1f041670c008e719be635f4205add6e9 (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
