From 1b45eaf3de4789e261e6257f4e2eb2d4e856d692 Mon Sep 17 00:00:00 2001 From: ehofman Date: Thu, 27 Oct 2005 08:21:58 +0000 Subject: [PATCH] =?utf8?q?Mathias=20Fr=F6hlich:?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit I guess the most important memory leaks are plugged now. Just by inspection: An other memory leak in Simgear. --- simgear/scene/material/matmodel.cxx | 2 +- simgear/scene/model/modellib.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/simgear/scene/material/matmodel.cxx b/simgear/scene/material/matmodel.cxx index 37d7d311..259789d4 100644 --- a/simgear/scene/material/matmodel.cxx +++ b/simgear/scene/material/matmodel.cxx @@ -110,7 +110,7 @@ SGMatModel::~SGMatModel () { for (unsigned int i = 0; i < _models.size(); i++) { if (_models[i] != 0) { - _models[i]->deRef(); + ssgDeRefDelete(_models[i]); _models[i] = 0; } } diff --git a/simgear/scene/model/modellib.cxx b/simgear/scene/model/modellib.cxx index 49073d63..5e7dfc98 100644 --- a/simgear/scene/model/modellib.cxx +++ b/simgear/scene/model/modellib.cxx @@ -23,7 +23,7 @@ SGModelLib::~SGModelLib () { map::iterator it = _table.begin(); while (it != _table.end()) { - it->second->deRef(); + ssgDeRefDelete(it->second); _table.erase(it); } } @@ -55,7 +55,7 @@ SGModelLib::flush1() // If there is only one reference, it's // ours; no one else is using the item. if (item->getRef() == 1) { - item->deRef(); + ssgDeRefDelete(item); _table.erase(it); } it++; -- 2.39.5