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