Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ebe01f commit 3bf1e07Copy full SHA for 3bf1e07
libraries/WiFi/src/WiFiUdp.cpp
@@ -44,7 +44,7 @@ uint8_t WiFiUDP::begin(IPAddress address, uint16_t port){
44
45
server_port = port;
46
47
- tx_buffer = new char[1460];
+ tx_buffer = (char *)malloc(1460);
48
if(!tx_buffer){
49
log_e("could not create tx buffer: %d", errno);
50
return 0;
@@ -100,7 +100,7 @@ uint8_t WiFiUDP::beginMulticast(IPAddress a, uint16_t p){
100
101
void WiFiUDP::stop(){
102
if(tx_buffer){
103
- delete[] tx_buffer;
+ free(tx_buffer);
104
tx_buffer = NULL;
105
}
106
tx_buffer_len = 0;
@@ -136,7 +136,7 @@ int WiFiUDP::beginPacket(){
136
137
// allocate tx_buffer if is necessary
138
139
140
141
142
0 commit comments