mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
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:
@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user