It's necessary to do serious checks for the memory leaks using
tools like valgrind. This patch tries to implement a graceful
exit for all tvheadend components and free allocated memory.
Also, some memory leaks were fixed.
This can be done in 3 ways:
none: don't hide anything
all: hide all disabled elements (you can't re-enable in this state)
default: hide those elements whose parents are disabled
The API code has also been updated to use the htsmsg auto conversion of
strings to map/list where required. Basic approach is check for list/map
first and if that fails fallback to string (if that's whats appropriate
for a mixed type field).