Skip to content

Memory leak when disabling help #32

@dgregorius

Description

@dgregorius

You only erase the command from the list, but don't delete it. Potential fix:

	void disable_help() {
		for (auto command = _commands.begin(); command != _commands.end(); ++command) {
			if ((*command)->name == "h" && (*command)->alternative == "--help") {
				delete  *command;
				_commands.erase(command);
				break;
			}
		}
	}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions