std::shared_ptr Memory Leak (#3680)

* std::shared_ptr Memory Leak

clientSocketHande and _rxBuffer are std::shared_ptr, the stop() call was not correctly releasing them and the operator= had similar problems fix for #3679

* operator= second attempt

* operator= third time
This commit is contained in:
chuck todd 2020-01-29 03:18:54 -07:00 committed by GitHub
parent ed220bd042
commit b2c678877c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -196,8 +196,8 @@ WiFiClient & WiFiClient::operator=(const WiFiClient &other)
void WiFiClient::stop()
{
clientSocketHandle = NULL;
_rxBuffer = NULL;
clientSocketHandle.reset(); // clientSocketHandle = NULL;
_rxBuffer.reset(); // _rxBuffer = NULL;
_connected = false;
}