Skip to content

make Tox_Options self contained #908

Open
@sudden6

Description

@sudden6

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.

Metadata

Metadata

Assignees

Labels

P2Medium prioritycleanupInternal code cleanup, possibly affecting semantics, e.g. deleting a deprecated feature.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions