<commit_before>#pragma once

#include <memory>
#include <mutex>

namespace ncv
{
        template
        <
                class tobject
        >
        class singleton_t
	{
        public:

                typedef tobject                                 this_object;
                typedef std::unique_ptr<this_object>            this_instance_t;
                typedef std::once_flag                          this_mutex_t;

                ///
                /// \brief acccess the only instance
                ///
                static this_object& instance()
                {
                        std::call_once(m_once_flag, []()
                        {
                                m_instance.reset(new this_object);
                        });<commit_msg>fix possible memory leak<commit_after>#pragma once

#include <memory>
#include <mutex>

namespace ncv
{
        template
        <
                class tobject
        >
        class singleton_t
	{
        public:

                typedef tobject                                 this_object;
                typedef std::unique_ptr<this_object>            this_instance_t;
                typedef std::once_flag                          this_mutex_t;

                ///
                /// \brief acccess the only instance
                ///
                static this_object& instance()
                {
                        std::call_once(m_once_flag, []()
                        {
                                singleton_t::m_instance.reset(new this_object);
                        });
{'fraction_non_alphanumeric': 0.06962025316455696, 'fraction_numerical': 0.0, 'mean_word_length': 0.8911483253588517, 'pattern_counts': {'":': 0, '<': 11, '<?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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6240899', 'n_tokens_mistral': 379, 'n_tokens_neox': 348, 'n_words': 71}