Skip to content

Commit 30029bb

Browse files
FranciscoMoyaLzw655
authored andcommitted
fix(lcd): use 'delete[]' instead of 'delete' for C array shared pointer @FranciscoMoya (#142)
Closes #142
1 parent f9ed184 commit 30029bb

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# ChangeLog
22

3+
## v0.2.2 - 2024-12-23
4+
5+
### Bugfixes:
6+
7+
* fix(lcd): use 'delete[]' instead of 'delete' for C array shared pointer @FranciscoMoya (#142)
8+
* fix(Kconfig): fix incorrect descriptions
9+
310
## v0.2.1 - 2024-11-14
411

512
### Enhancements:

idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "0.2.1"
1+
version: "0.2.2"
22
description: ESP32_Display_Panel is a library designed for ESP SoCs to drive display panels and facilitate rapid GUI development.
33
url: https://github.com/esp-arduino-libs/ESP32_Display_Panel
44
repository: https://github.com/esp-arduino-libs/ESP32_Display_Panel.git

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=ESP32_Display_Panel
2-
version=0.2.1
2+
version=0.2.2
33
author=espressif
44
maintainer=espressif
55
sentence=ESP32_Display_Panel is a library designed for ESP SoCs to drive display panels and facilitate rapid GUI development.

src/ESP_PanelVersions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
/* Library Version */
1212
#define ESP_PANEL_VERSION_MAJOR 0
1313
#define ESP_PANEL_VERSION_MINOR 2
14-
#define ESP_PANEL_VERSION_PATCH 1
14+
#define ESP_PANEL_VERSION_PATCH 2
1515

1616
/* File `ESP_Panel_Conf.h` */
1717
#define ESP_PANEL_CONF_VERSION_MAJOR 0

src/lcd/ESP_PanelLcd.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ bool ESP_PanelLcd::colorBarTest(uint16_t width, uint16_t height)
484484
int res_line_count = 0;
485485

486486
/* Malloc memory for a single color bar */
487-
shared_ptr<uint8_t> single_bar_buf(new uint8_t[row_per_bar * width * bytes_per_piexl]);
487+
shared_ptr<uint8_t> single_bar_buf(new uint8_t[row_per_bar * width * bytes_per_piexl], [](uint8_t* ptr) { delete[] ptr; });
488488
ESP_PANEL_CHECK_FALSE_RET(single_bar_buf != nullptr, false, "Malloc color buffer failed");
489489

490490
/* Draw color bar from top left to bottom right, the order is B - G - R */

0 commit comments

Comments
 (0)