[PR #374] [MERGED] use malloc/free for WiFiManagerParameter* array instead of hard coding. #1611

Closed
opened 2026-02-28 01:30:51 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/tzapu/WiFiManager/pull/374
Author: @liebman
Created: 6/4/2017
Status: Merged
Merged: 1/30/2018
Merged by: @tablatronix

Base: masterHead: allocate-params-array


📝 Commits (8)

  • 362a561 use malloc/free for WiFiManagerParameter* array instead of hard coding.
  • 3950a3b use single constructor with default value for size
  • c4905c2 remove init function as its not needed with one constructor
  • 8987680 removed un-needed constructor declaration
  • 3370417 Merge remote-tracking branch 'upstream/master' into allocate-params-array
  • 6465d72 Refactored to use only a default constructor and automatically resize the parameter array each time the size limit is reached.
  • 0b6341b cleanup readme (removed hint about alternate constructor)
  • d66cd47 use realloc() when increasing the size of _params. addParameter() now returns bool

📊 Changes

2 files changed (+32 additions, -10 deletions)

View changed files

📝 WiFiManager.cpp (+27 -7)
📝 WiFiManager.h (+5 -3)

📄 Description

Dynamically allocate the _params array. Existing no arg constructor uses the same default, 10, as it used to. Added a second constructor that allows setting size. Added Destructor that frees allocated _params.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/tzapu/WiFiManager/pull/374 **Author:** [@liebman](https://github.com/liebman) **Created:** 6/4/2017 **Status:** ✅ Merged **Merged:** 1/30/2018 **Merged by:** [@tablatronix](https://github.com/tablatronix) **Base:** `master` ← **Head:** `allocate-params-array` --- ### 📝 Commits (8) - [`362a561`](https://github.com/tzapu/WiFiManager/commit/362a561a35960ea8ae8a67f2ab2daa5af2f242df) use malloc/free for WiFiManagerParameter* array instead of hard coding. - [`3950a3b`](https://github.com/tzapu/WiFiManager/commit/3950a3b859f9a3c85dbcce21165f71ff1ff2b6c5) use single constructor with default value for size - [`c4905c2`](https://github.com/tzapu/WiFiManager/commit/c4905c23b789df4f687d18923ebcd0855ded7968) remove init function as its not needed with one constructor - [`8987680`](https://github.com/tzapu/WiFiManager/commit/898768092cab07c748c70b00dbbb6a627e50a00a) removed un-needed constructor declaration - [`3370417`](https://github.com/tzapu/WiFiManager/commit/33704176e0039dc5497c3a73dd49f4a60fcbd94b) Merge remote-tracking branch 'upstream/master' into allocate-params-array - [`6465d72`](https://github.com/tzapu/WiFiManager/commit/6465d72f6e76cea610496240c682bdbce30b0ea3) Refactored to use only a default constructor and automatically resize the parameter array each time the size limit is reached. - [`0b6341b`](https://github.com/tzapu/WiFiManager/commit/0b6341bea431767d95008f9a36c9b5d5c538ff08) cleanup readme (removed hint about alternate constructor) - [`d66cd47`](https://github.com/tzapu/WiFiManager/commit/d66cd47df87f2b478e7f7568b7c8e141c02dd53a) use realloc() when increasing the size of _params. addParameter() now returns bool ### 📊 Changes **2 files changed** (+32 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `WiFiManager.cpp` (+27 -7) 📝 `WiFiManager.h` (+5 -3) </details> ### 📄 Description Dynamically allocate the _params array. Existing no arg constructor uses the same default, 10, as it used to. Added a second constructor that allows setting size. Added Destructor that frees allocated _params. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 01:30:51 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#1611
No description provided.