forked from speed-dreams/speed-dreams-code
No leaks in start-stop-cycle remaining
A race causes memory blocks be corrupted independent from the robot used git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@5832 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: a51684b5586db6acc0578cfe2e2c45845b617449 Former-commit-id: 32852ebe6691ab816241f5b0d21a15f38f90c24b
This commit is contained in:
parent
22fb895434
commit
15b129c2e4
5 changed files with 12 additions and 4 deletions
|
@ -217,7 +217,7 @@ void* GfMemoryManagerAlloc (size_t size, unsigned int Type, void* RetAddr)
|
|||
// b: (void*) official pointer to the new data block
|
||||
|
||||
// Hunting memory leaks ...
|
||||
#define IDTOSTOP 7815 // ID of block you are looking for
|
||||
#define IDTOSTOP 272737 // ID of block you are looking for
|
||||
|
||||
if (ID == IDTOSTOP)
|
||||
{
|
||||
|
|
|
@ -361,6 +361,12 @@ void
|
|||
gfuiReleaseCombobox(tGfuiObject *obj)
|
||||
{
|
||||
delete obj->u.combobox.pInfo;
|
||||
|
||||
tGfuiLabel *label;
|
||||
label = &(obj->u.combobox.label);
|
||||
freez(label->userDataOnFocus);
|
||||
free(label->text);
|
||||
|
||||
freez(obj->u.combobox.userDataOnFocus);
|
||||
free(obj);
|
||||
}
|
||||
|
|
|
@ -77,11 +77,11 @@ ReReset(void)
|
|||
// Race Engine cleanup
|
||||
void ReCleanup(void)
|
||||
{
|
||||
ReSituation::terminate();
|
||||
if (!ReInfo)
|
||||
return;
|
||||
|
||||
// Free ReInfo memory.
|
||||
ReSituation::terminate();
|
||||
ReInfo = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -91,11 +91,13 @@ ReReset(void)
|
|||
// Race Engine cleanup
|
||||
void ReCleanup(void)
|
||||
{
|
||||
ReSituation::terminate();
|
||||
|
||||
if (!ReInfo)
|
||||
return;
|
||||
|
||||
// Free ReInfo memory.
|
||||
ReSituation::terminate();
|
||||
// ReSituation::terminate();
|
||||
ReInfo = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -188,7 +188,7 @@ void LegacyMenu::quit()
|
|||
|
||||
void LegacyMenu::shutdown()
|
||||
{
|
||||
// Shutdown graphics in case relevant and not already done.
|
||||
// Shutdown graphics in case relevant and not already done.
|
||||
if (_piRaceEngine->inData()->_displayMode == RM_DISP_MODE_NORMAL)
|
||||
{
|
||||
shutdownSound();
|
||||
|
|
Loading…
Reference in a new issue