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:
parent
746cac055a
commit
1e8da5fd15
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user