mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-24 21:58:22 +00:00
Group/raid memleaks
This commit is contained in:
+9
-2
@@ -2026,13 +2026,16 @@ void EntityList::RemoveAllNPCs()
|
|||||||
|
|
||||||
void EntityList::RemoveAllMercs()
|
void EntityList::RemoveAllMercs()
|
||||||
{
|
{
|
||||||
|
// doesn't clear the data
|
||||||
merc_list.clear();
|
merc_list.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntityList::RemoveAllGroups()
|
void EntityList::RemoveAllGroups()
|
||||||
{
|
{
|
||||||
while (group_list.size())
|
while (group_list.size()) {
|
||||||
|
safe_delete(group_list.front());
|
||||||
group_list.pop_front();
|
group_list.pop_front();
|
||||||
|
}
|
||||||
#if EQDEBUG >= 5
|
#if EQDEBUG >= 5
|
||||||
CheckGroupList (__FILE__, __LINE__);
|
CheckGroupList (__FILE__, __LINE__);
|
||||||
#endif
|
#endif
|
||||||
@@ -2040,9 +2043,11 @@ void EntityList::RemoveAllGroups()
|
|||||||
|
|
||||||
void EntityList::RemoveAllRaids()
|
void EntityList::RemoveAllRaids()
|
||||||
{
|
{
|
||||||
while (raid_list.size())
|
while (raid_list.size()) {
|
||||||
|
safe_delete(raid_list.front());
|
||||||
raid_list.pop_front();
|
raid_list.pop_front();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void EntityList::RemoveAllDoors()
|
void EntityList::RemoveAllDoors()
|
||||||
{
|
{
|
||||||
@@ -2251,6 +2256,7 @@ bool EntityList::RemoveGroup(uint32 delete_id)
|
|||||||
while(iterator != group_list.end())
|
while(iterator != group_list.end())
|
||||||
{
|
{
|
||||||
if((*iterator)->GetID() == delete_id) {
|
if((*iterator)->GetID() == delete_id) {
|
||||||
|
safe_delete(*iterator);
|
||||||
group_list.remove(*iterator);
|
group_list.remove(*iterator);
|
||||||
#if EQDEBUG >= 5
|
#if EQDEBUG >= 5
|
||||||
CheckGroupList (__FILE__, __LINE__);
|
CheckGroupList (__FILE__, __LINE__);
|
||||||
@@ -2274,6 +2280,7 @@ bool EntityList::RemoveRaid(uint32 delete_id)
|
|||||||
while(iterator != raid_list.end())
|
while(iterator != raid_list.end())
|
||||||
{
|
{
|
||||||
if((*iterator)->GetID() == delete_id) {
|
if((*iterator)->GetID() == delete_id) {
|
||||||
|
safe_delete(*iterator);
|
||||||
raid_list.remove(*iterator);
|
raid_list.remove(*iterator);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user