fAppName was leaked (CID 6). Also moved the initialization of fText to the end of the function, so that we avoid a BString::Adopt() call

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27447 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2008-09-12 10:26:05 +00:00
parent 746cac055a
commit 1e8da5fd15
1 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,6 @@ BAboutWindow::BAboutWindow(char *appName, int32 firstCopyrightYear,
const char **authors, char *extraInfo)
{
fAppName = new BString(appName);
fText = new BString();
// Get current year
time_t tp;
@ -42,13 +41,14 @@ BAboutWindow::BAboutWindow(char *appName, int32 firstCopyrightYear,
text << "\n" << extraInfo << "\n";
}
fText->Adopt(text);
fText = new BString(text);
}
BAboutWindow::~BAboutWindow()
{
delete fText;
delete fAppName;
}