Page 1 of 1

Minor bugs/memory leaks

Posted: 08.09.2004, 09:21
by hjw
Hello,

browsing through the source (1.3.2) I stumbled across a few minor things.

If that's not the right place or way to post them, tell me!

1) body.cpp

current:
void Body::setOrbit(Orbit* _orbit)
{
if (orbit == NULL)
delete orbit;
orbit = _orbit;
}

should be:
void Body::setOrbit(Orbit* _orbit)
{
if (orbit != NULL)
delete orbit;
orbit = _orbit;
}



2) selectionpopup.cpp

In "void SelectionPopup::process(int id)":

"altSurfaces" is created by not deleted (memory leak)

In "SelectionPopup::insert" it IS deleted"


3) selectionpopup.cpp (KDE)

I'm not quite sure about this one.
Seems to me (looking at the source), that if there are more than 80 alternate surfaces, they are displayed in the popup (up to 100),
but surfaces #80 to 99 are not handled correctly (only up to 80 should be displayed).

I have not created that many surfaces to verify this.
And I didn't figure out exactly how that level/actionID stuff works.

MfG - HJW