File tree Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -42,13 +42,27 @@ static void setDNSServer(char *ip) {
42
42
*/
43
43
44
44
45
- WiFi::WiFi () {
46
- ip = " " ;
47
- gw = " " ;
48
- netmask = " " ;
45
+ }
46
+ */
47
+
48
+ /* *
49
+ * @brief Creates and uses a default event handler
50
+ */
51
+ WiFi::WiFi ()
52
+ : ip(" " )
53
+ , gw(" " )
54
+ , netmask(" " )
55
+ , wifiEventHandler(nullptr )
56
+ {
49
57
wifiEventHandler = new WiFiEventHandler ();
50
58
}
51
59
60
+ /* *
61
+ * @brief Deletes the event handler that was used by the class
62
+ */
63
+ WiFi::~WiFi () {
64
+ delete wifiEventHandler;
65
+ }
52
66
53
67
/* *
54
68
* @brief Add a reference to a DNS server.
Original file line number Diff line number Diff line change @@ -110,6 +110,7 @@ class WiFi {
110
110
111
111
public:
112
112
WiFi ();
113
+ ~WiFi ();
113
114
void addDNSServer (const std::string& ip);
114
115
void addDNSServer (const char * ip);
115
116
void setDNSServer (int numdns, const std::string& ip);
You can’t perform that action at this time.
0 commit comments