Commit dbfa914f authored by Alexey Hohlov's avatar Alexey Hohlov
Browse files

Очистка всего что посоздавали.

parent e36f7e65
......@@ -56,5 +56,5 @@ void IObject2D::size(CBox s)
IObject2D::~IObject2D()
{
delete sprite;
}
......@@ -46,3 +46,10 @@ void CFabric::setmap(CMap* level)
{
map = level;
}
CFabric::~CFabric()
{
for (auto& prot : reg) {
delete prot.second;
}
}
......@@ -185,6 +185,8 @@ void CMap::loadmap(string name)
}
fclose(mapfile);
delete [] MapName;
} else {
exit(1);
}
......@@ -439,6 +441,7 @@ void CMap::DrawGround()
CMap::~CMap()
{
int32_t i, j;
int cx;
for (i = 0; i < cells_x; i++) {
for (j = 0; j < cells_y; j++) {
......@@ -451,6 +454,11 @@ CMap::~CMap()
}
}
for (i = 0; i <= cells_x; i++) {
delete [] cells[i];
}
delete [] cells;
if (!dynamics.empty()) {
for (IObjectDynamic* d : dynamics) {
delete d;
......@@ -466,4 +474,11 @@ CMap::~CMap()
}
}
delete [] grounds;
cx = map_w / 64 + 1;
for (i = 0; i < cx + 1; i++) {
delete [] landscape[i];
}
delete [] landscape;
}
......@@ -115,5 +115,5 @@ float TFont::StringWidth(std::string text)
TFont::~TFont()
{
delete fnt_sprite;
}
......@@ -21,5 +21,5 @@ public:
virtual void Serialize() {}
virtual void DeSerialize() {}
~IObjectBase() {}
virtual ~IObjectBase() {}
};
......@@ -13,6 +13,8 @@ private:
int current_id;
CMap* map;
~CFabric();
public:
static CFabric& GetFabric();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment