From 4388bf8cc74acb2cc897151cc4c5a670bc3a5fe4 Mon Sep 17 00:00:00 2001 From: Dave Allie Date: Wed, 4 Mar 2026 01:41:02 +1100 Subject: [PATCH] fix: Enable DESTRUCTOR_CLOSES_FILE flag (#1075) ## Summary * Enable `DESTRUCTOR_CLOSES_FILE` flag * We're never intending to not close files, so if we accidentally leave them open as they're destructured, this will help close them. ## Additional Context * As spotted in https://github.com/crosspoint-reader/crosspoint-reader/pull/869, there are cases where we were accidentally not closing files Looks to use about 5K of flash. ``` RAM: [=== ] 31.5% (used 103100 bytes from 327680 bytes) Flash: [======= ] 68.9% (used 4513220 bytes from 6553600 bytes) ``` ``` RAM: [=== ] 31.5% (used 103100 bytes from 327680 bytes) Flash: [======= ] 68.9% (used 4518498 bytes from 6553600 bytes) ``` --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? No --- platformio.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/platformio.ini b/platformio.ini index fc6bd0f6..691f1570 100644 --- a/platformio.ini +++ b/platformio.ini @@ -24,6 +24,7 @@ build_flags = -DARDUINO_USB_CDC_ON_BOOT=1 -DEINK_DISPLAY_SINGLE_BUFFER_MODE=1 -DDISABLE_FS_H_WARNING=1 + -DDESTRUCTOR_CLOSES_FILE=1 # https://libexpat.github.io/doc/api/latest/#XML_GE -DXML_GE=0 -DXML_CONTEXT_BYTES=1024