/*
 * Copyright 2003-2015, Haiku. All rights reserved.
 * Distributed under the terms of the MIT License.
 *
 * Authors:
 *		Atsushi Takamatsu
 *		Jérôme Duval
 *		Oliver Ruiz Dorantes
 */
 
 
#include "HApp.h"
#include "HWindow.h"
 
#include <Alert.h>
#include <Catalog.h>
#include <Locale.h>
 
 
#undef B_TRANSLATION_CONTEXT
#define B_TRANSLATION_CONTEXT "SoundsHApp"
 
 
HApp::HApp()
	:
	BApplication("application/x-vnd.Haiku-Sounds")
{
	HWindow* window = new HWindow(BRect(-1, -1, 390, 420),
		B_TRANSLATE_SYSTEM_NAME("Sounds"));
	window->Show();
}
 
 
HApp::~HApp()
{
}
 
 
void
HApp::AboutRequested()
{
	BAlert* alert = new BAlert(B_TRANSLATE("About Sounds"),
		B_TRANSLATE("Sounds\n"
			"  Brought to you by :\n"
			"\tOliver Ruiz Dorantes\n"
			"\tJérôme DUVAL.\n"
			"  Original work from Atsushi Takamatsu.\n"
			"Copyright ©2003-2006 Haiku"),
		B_TRANSLATE("OK"));
	alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
	alert->Go();
}
 
 
//	#pragma mark -
 
 
int
main()
{
	HApp app;
	app.Run();
 
	return 0;
}
 

V773 Visibility scope of the 'alert' pointer was exited without releasing the memory. A memory leak is possible.