<commit_before>#include "../StarEngine/jni/Logger.h"
#include "Game.h"

#ifdef _WIN32

#include "../StarEngine/jni/Window.h"
#include <Windows.h>

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR cmdLine, int cmdShow) 
{
	Game * pGame = new Game();

	star::Window::GetInstance()->Initialize(hInstance, pGame);

	delete pGame;

	return 0;
}

#else
#include "../StarEngine/jni/EventLoop.h"

void android_main(android_app* pApplication) 
{
	app_dummy();

	Game * pGame = new Game();

	star::EventLoop::GetInstance()->Initialize(pApplication, pGame);
	star::EventLoop::GetInstance()->Run();

	delete pGame;
}
#endif<commit_msg>added resource leak check and heap corruption check<commit_after>#include "../StarEngine/jni/Logger.h"
#include "Game.h"

#ifdef _WIN32

#include "../StarEngine/jni/Window.h"
#include <Windows.h>

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR cmdLine, int cmdShow) 
{
	//notify user if heap is corrupt
	HeapSetInformation(NULL, HeapEnableTerminationOnCorruption, NULL,0);

	// Enable run-time memory leak check for debug builds.
	#if defined(DEBUG) | defined(_DEBUG)
		_CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
		_CrtSetBreakAlloc(2214);
	#endif

	Game * pGame = new Game();

	star::Window::GetInstance()->Initialize(hInstance, pGame);

	delete pGame;

	return 0;
}

#else
#include "../StarEngine/jni/EventLoop.h"

void android_main(android_app* pApplication) 
{
	app_dummy();

	Game * pGame = new Game();

	star::EventLoop::GetInstance()->Initialize(pApplication, pGame);
	star::EventLoop::GetInstance()->Run();

	delete pGame;
}
#endif
{'fraction_non_alphanumeric': 0.143646408839779, 'fraction_numerical': 0.006752608962553714, 'mean_word_length': 5.468253968253968, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4171857', 'n_tokens_mistral': 582, 'n_tokens_neox': 566, 'n_words': 125}