Open
Description
tox.h
https://github.com/TokTok/c-toxcore/blob/master/toxcore/tox.h#L557 says:
The data pointed at by this member is owned by the user, so must outlive the options object.
For savedata_data
and proxy_host
. I think we should change this so that the setter function copies the data and the destructor frees the memory. Optionally we can could also take ownership of the pointer passed and only free it in the destructor, but I don't think this is a good design practice.
This doesn't break the API, so it should be safe to implement.