This API was returning a "const char*" and it was unclear who took care of the underlying memory. Returning a String makes that obvious. Also make sure we close the /etc/passwd file when we're done with it. |
||
|---|---|---|
| .. | ||
| main.cpp | ||
| Makefile | ||
This API was returning a "const char*" and it was unclear who took care of the underlying memory. Returning a String makes that obvious. Also make sure we close the /etc/passwd file when we're done with it. |
||
|---|---|---|
| .. | ||
| main.cpp | ||
| Makefile | ||