<commit_before>#ifndef PCAPPP_POINTER_VECTOR
#define PCAPPP_POINTER_VECTOR

#include <stdio.h>
#include <stdint.h>
#include <vector>

template<typename T>
class PointerVector
{
public:
	typedef typename std::vector<T*>::iterator VectorIterator;

	PointerVector() { }
	~PointerVector()
	{
		for (VectorIterator iter = m_Vector.begin(); iter != m_Vector.end(); iter++)
		{
			delete (*iter);
		}
	}

	void clear()
	{
		for (VectorIterator iter = m_Vector.begin(); iter != m_Vector.end(); iter++)
		{
			delete (*iter);
		}

		m_Vector.clear();
	}

	inline void pushBack(T* element) { m_Vector.push_back(element); }
	inline VectorIterator begin() { return m_Vector.begin(); }
	inline VectorIterator end() { return m_Vector.end(); }
	inline size_t size() { return m_Vector.size(); }

private:
	std::vector<T*> m_Vector;
};

#endif /* PCAPPP_POINTER_VECTOR */<commit_msg>Fixed memory leaks in Pcap++Test on Windows<commit_after>#ifndef PCAPPP_POINTER_VECTOR
#define PCAPPP_POINTER_VECTOR

#include <stdio.h>
#include <stdint.h>
#include <vector>

template<typename T>
class PointerVector
{
public:
	typedef typename std::vector<T*>::iterator VectorIterator;

	PointerVector() { }
	~PointerVector()
	{
		for (VectorIterator iter = m_Vector.begin(); iter != m_Vector.end(); iter++)
		{
			delete (*iter);
		}
	}

	void clear()
	{
		for (VectorIterator iter = m_Vector.begin(); iter != m_Vector.end(); iter++)
		{
			delete (*iter);
		}

		m_Vector.clear();
	}

	inline void pushBack(T* element) { m_Vector.push_back(element); }
	inline VectorIterator begin() { return m_Vector.begin(); }
	inline VectorIterator end() { return m_Vector.end(); }
	inline size_t size() { return m_Vector.size(); }
	inline T* front() { return m_Vector.front(); }

private:
	std::vector<T*> m_Vector;
};

#endif /* PCAPPP_POINTER_VECTOR */
{'fraction_non_alphanumeric': 0.1541436464088398, 'fraction_numerical': 0.0, 'mean_word_length': 4.87987012987013, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '4529876', 'n_tokens_mistral': 667, 'n_tokens_neox': 633, 'n_words': 145}