Some more leak hunting/housekeeping, probably wont affect Issue 2184 in a noticeable way tho.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5046 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
j4ck.fr0st
2010-02-12 19:28:51 +00:00
parent 99ea22bbf3
commit df1be33ba9
6 changed files with 24 additions and 9 deletions

View File

@ -98,7 +98,8 @@ GameListItem::GameListItem(const std::string& _rFileName)
if (pBannerLoader->GetBanner(g_ImageTemp))
{
m_ImageSize = DVD_BANNER_WIDTH * DVD_BANNER_HEIGHT * 3;
m_pImage = new u8[m_ImageSize]; //(u8*)malloc(m_ImageSize);
//use malloc(), since wxImage::Create below calls free() afterwards.
m_pImage = (u8*)malloc(m_ImageSize);
for (size_t i = 0; i < DVD_BANNER_WIDTH * DVD_BANNER_HEIGHT; i++)
{
@ -125,12 +126,9 @@ GameListItem::GameListItem(const std::string& _rFileName)
}
}
// i am not sure if this is a leak or if wxImage will release the code
if (m_pImage)
{
#if defined(HAVE_WX) && HAVE_WX
m_Image.Create(DVD_BANNER_WIDTH, DVD_BANNER_HEIGHT, m_pImage);
#endif
}
else
{