WiFi接口析构时自动销毁ssid/pass
This commit is contained in:
parent
29202abaa7
commit
c156bc9d34
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -113,7 +113,7 @@ public:
|
|||
String* Pass; // 无线密码
|
||||
|
||||
WiFiInterface();
|
||||
virtual ~WiFiInterface() { }
|
||||
virtual ~WiFiInterface();
|
||||
|
||||
bool IsStation() const;
|
||||
bool IsAP() const;
|
||||
|
|
Loading…
Reference in New Issue