<commit_before>#ifndef EXEC_H
#define EXEC_H

#include <iostream>
#include "controlclient.h"
#include "callback.h"
#include "art.h"

class Execute : public Callback {
	ControlClient *jobcontrol = nullptr;
	art_tree *cache = nullptr;

	Execute() {};

	~Execute() {
		if (this->cache)
			art_tree_destroy(this->cache);
	}

	Execute(Execute const&);
	void operator=(Execute const&);

	static Execute& getInstance() {
		static Execute instance;
		return instance;
	}

  public:
	struct Parameter {
		unsigned int jobid;<commit_msg>Free cache allocated objects<commit_after>#ifndef EXEC_H
#define EXEC_H

#include <iostream>
#include "controlclient.h"
#include "callback.h"
#include "art.h"

inline int iter_cb(void *data, const unsigned char *key, uint32_t key_len, void *val) {
	delete static_cast<std::string *>(val);
	return 0;
}

class Execute : public Callback {
	ControlClient *jobcontrol = nullptr;
	art_tree *cache = nullptr;

	Execute() {};

	~Execute() {
		if (this->cache) {
			std::string out;
			art_iter(this->cache, iter_cb, &out);
			art_tree_destroy(this->cache);
		}
	}

	Execute(Execute const&);
	void operator=(Execute const&);

	static Execute& getInstance() {
		static Execute instance;
		return instance;
	}

  public:
	struct Parameter {
		unsigned int jobid;
{'fraction_non_alphanumeric': 0.12822517591868648, 'fraction_numerical': 0.0023455824863174357, 'mean_word_length': 4.7657657657657655, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2168202', 'n_tokens_mistral': 465, 'n_tokens_neox': 434, 'n_words': 116}