|
@@ -407,13 +407,12 @@ namespace Framework
|
|
void leeren()
|
|
void leeren()
|
|
{
|
|
{
|
|
ArrayEintrag<TYP>* e2 = 0;
|
|
ArrayEintrag<TYP>* e2 = 0;
|
|
- for (ArrayEintrag<TYP>* e = entries; e; e = e->next)
|
|
|
|
|
|
+ for (ArrayEintrag<TYP>* e = entries->next; e; e = e->next)
|
|
{
|
|
{
|
|
delete e2;
|
|
delete e2;
|
|
e2 = e;
|
|
e2 = e;
|
|
}
|
|
}
|
|
delete e2;
|
|
delete e2;
|
|
- entries = new ArrayEintrag<TYP>();
|
|
|
|
entries->set = 0;
|
|
entries->set = 0;
|
|
entries->next = 0;
|
|
entries->next = 0;
|
|
last = entries;
|
|
last = entries;
|
|
@@ -710,14 +709,15 @@ namespace Framework
|
|
//! Löscht alle Elemente der Liste
|
|
//! Löscht alle Elemente der Liste
|
|
void leeren()
|
|
void leeren()
|
|
{
|
|
{
|
|
- for (ArrayEintrag<TYP*>* e = entries; e;)
|
|
|
|
|
|
+ for (ArrayEintrag<TYP*>* e = entries->next; e;)
|
|
{
|
|
{
|
|
if (e && e->var && e->set) e->var->release();
|
|
if (e && e->var && e->set) e->var->release();
|
|
auto tmp = e->next;
|
|
auto tmp = e->next;
|
|
delete e;
|
|
delete e;
|
|
e = tmp;
|
|
e = tmp;
|
|
}
|
|
}
|
|
- entries = new ArrayEintrag<TYP*>();
|
|
|
|
|
|
+ if (entries && entries->var && entries->set)
|
|
|
|
+ entries->var->release();
|
|
entries->set = 0;
|
|
entries->set = 0;
|
|
entries->next = 0;
|
|
entries->next = 0;
|
|
last = entries;
|
|
last = entries;
|