<commit_before>//
// C++ Implementation: MilkdropPresetFactory
//
// Description: 
//
//
// Author: <NAME> <<EMAIL>>, (C) 2008
//
// Copyright: See COPYING file that comes with this distribution
//
//
//
#include "MilkdropPresetFactory.hpp"
#include "MilkdropPreset.hpp"
#include "BuiltinFuncs.hpp"
#include "Eval.hpp"
#include "IdlePreset.hpp"
#include "PresetFrameIO.hpp"

MilkdropPresetFactory::MilkdropPresetFactory(int gx, int gy) {
	/* Initializes the builtin function database */
	BuiltinFuncs::init_builtin_func_db();

	/* Initializes all infix operators */
	Eval::init_infix_ops();	
	
	initializePresetOutputs(gx,gy);
}

MilkdropPresetFactory::~MilkdropPresetFactory() {

	Eval::destroy_infix_ops();
	BuiltinFuncs::destroy_builtin_func_db();

}

/* Reinitializes the engine variables to a default (conservative and sane) value */
void MilkdropPresetFactory::reset()
{

	_presetOutputs->zoom=1.0;
	_presetOutputs->zoomexp = 1.0;
	_presetOutputs->rot= 0.0;
	_presetOutputs->warp= 0.0;
<commit_msg>fixed memory leak on milkdrop preset factory destroy. <commit_after>//
// C++ Implementation: MilkdropPresetFactory
//
// Description: 
//
//
// Author: <NAME> <<EMAIL>>, (C) 2008
//
// Copyright: See COPYING file that comes with this distribution
//
//
//
#include "MilkdropPresetFactory.hpp"
#include "MilkdropPreset.hpp"
#include "BuiltinFuncs.hpp"
#include "Eval.hpp"
#include "IdlePreset.hpp"
#include "PresetFrameIO.hpp"

MilkdropPresetFactory::MilkdropPresetFactory(int gx, int gy) {
	/* Initializes the builtin function database */
	BuiltinFuncs::init_builtin_func_db();

	/* Initializes all infix operators */
	Eval::init_infix_ops();	
	
	initializePresetOutputs(gx,gy);
}

MilkdropPresetFactory::~MilkdropPresetFactory() {

	Eval::destroy_infix_ops();
	BuiltinFuncs::destroy_builtin_func_db();
	delete(_presetOutputs);
}

/* Reinitializes the engine variables to a default (conservative and sane) value */
void MilkdropPresetFactory::reset()
{

	_presetOutputs->zoom=1.0;
	_presetOutputs->zoomexp = 1.0;
	_presetOutputs->rot= 0.0;
	_presetOutputs->warp= 0.0;

{'fraction_non_alphanumeric': 0.13989387361312108, 'fraction_numerical': 0.011577424023154847, 'mean_word_length': 5.303951367781155, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 17, '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': '7390985', 'n_tokens_mistral': 771, 'n_tokens_neox': 742, 'n_words': 149}