File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,6 @@ static bool any_display_uses_this_framebuffer(mp_obj_base_t *obj) {
100100}
101101#endif
102102
103-
104103void displayio_background (void ) {
105104 if (mp_hal_is_interrupted ()) {
106105 return ;
@@ -253,8 +252,15 @@ void malloc_display_memory(void) {
253252void reset_displays (void ) {
254253 // In CircuitPython 10, release secondary displays before doing anything else:
255254 common_hal_displayio_release_displays_impl (true);
255+ #if CIRCUITPY_OS_GETENV && CIRCUITPY_SET_DISPLAY_LIMIT
256256 // Set dynamically allocated displays to 0 (CIRCUITPY_DISPLAY_LIMIT)
257257 max_allocated_display = CIRCUITPY_DISPLAY_LIMIT ;
258+ // Does this need to be done or dos port_free effectively do this?
259+ m_del (primary_display_bus_t , display_buses_dyn , (max_allocated_display - CIRCUITPY_DISPLAY_LIMIT ));
260+ m_del (primary_display_t , displays_dyn , (max_allocated_display - CIRCUITPY_DISPLAY_LIMIT ));
261+ display_buses_dyn = NULL ;
262+ displays_dyn = NULL ;
263+ #endif
258264
259265 // The SPI buses used by FourWires may be allocated on the heap so we need to move them inline.
260266 for (uint8_t i = 0 ; i < CIRCUITPY_DISPLAY_LIMIT ; i ++ ) {
You can’t perform that action at this time.
0 commit comments