madhephaestus / ESP32Servo

Arduino-compatible servo library for the ESP32
140 stars 55 forks source link

Fix memory leak in analogWrite #14

Closed FedericoBusero closed 4 years ago

FedericoBusero commented 4 years ago

Both the original code as the latest version contain a memory leak in analogWrite: ESP32PWM objects are detached by using detachPin, but are not deleted from memory. Now it only creates a new ESP32PWM object when value is not 0 or 255