WiFi接口析构时自动销毁ssid/pass

This commit is contained in:
大石头X2 2017-03-01 01:19:22 +08:00
parent 29202abaa7
commit c156bc9d34
3 changed files with 22 additions and 17 deletions

View File

@ -50,8 +50,7 @@ Esp8266::Esp8266(COM idx, Pin power, Pin rst)
Esp8266::~Esp8266()
{
delete SSID;
delete Pass;
RemoveLed();
}
void Esp8266::Init(ITransport* port, Pin power, Pin rst)

View File

@ -289,6 +289,12 @@ WiFiInterface::WiFiInterface() : NetworkInterface()
Pass = nullptr;
}
WiFiInterface::~WiFiInterface()
{
delete SSID;
delete Pass;
}
bool WiFiInterface::IsStation() const
{
return Mode == NetworkType::Station || Mode == NetworkType::STA_AP;

View File

@ -113,7 +113,7 @@ public:
String* Pass; // 无线密码
WiFiInterface();
virtual ~WiFiInterface() { }
virtual ~WiFiInterface();
bool IsStation() const;
bool IsAP() const;