blob: 537770bcd1db71591e952830fe946449939920c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#include "services.h"
#include "modules.h"
Base::Base()
{
}
Base::~Base()
{
for (std::set<dynamic_reference_base *>::iterator it = this->References.begin(), it_end = this->References.end(); it != it_end; ++it)
{
(*it)->Invalidate();
}
FOREACH_MOD(I_OnObjectDestroy, OnObjectDestroy(this));
}
void Base::AddReference(dynamic_reference_base *r)
{
this->References.insert(r);
}
void Base::DelReference(dynamic_reference_base *r)
{
this->References.erase(r);
}
|