Commit cc62f2b
HUB75: free the virtual mapping instead of dropping it
Review finding (CodeRabbit, 15.09.): when the arrangement changes on a re-used
display, begin() cleared the pointer to the old VirtualMatrixPanel without freeing
it, and the non-S3 cleanup() path deleted the display but never the mapping built
on it. Both leaks are real - nothing referenced the object afterwards - though small
(the object holds a handful of integers and a pointer).
The delete had been disabled over -Wdelete-non-virtual-dtor: VirtualMatrixPanel has
a virtual getCoords() and no virtual destructor (upstream and the sh7 fork alike).
That warning concerns deleting a derived object through this pointer; here the
pointer is the exact type, the class has no destructor and owns no resources, so
the delete is well-defined. The warning is silenced only around the two delete
statements, with the reason next to them.
Built warning-free for adafruit_matrixportal_esp32s3_tinyUF2 (S3 path) and
esp32_4MB_V4_S_HUB75 (classic path, which compiles the cleanup() delete).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>1 parent b9ca982 commit cc62f2b
1 file changed
Lines changed: 16 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1142 | 1142 | | |
1143 | 1143 | | |
1144 | 1144 | | |
1145 | | - | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
1146 | 1150 | | |
1147 | 1151 | | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
1148 | 1156 | | |
| 1157 | + | |
1149 | 1158 | | |
1150 | 1159 | | |
1151 | 1160 | | |
| |||
1328 | 1337 | | |
1329 | 1338 | | |
1330 | 1339 | | |
1331 | | - | |
1332 | 1340 | | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
1333 | 1347 | | |
1334 | 1348 | | |
1335 | 1349 | | |
| |||
0 commit comments