REVIEW: Memory Leaks
This commit is contained in:
@@ -113,6 +113,7 @@ public:
|
|||||||
return;
|
return;
|
||||||
_triangleSet.insert(indexKey);
|
_triangleSet.insert(indexKey);
|
||||||
BVHStaticTriangle* staticTriangle;
|
BVHStaticTriangle* staticTriangle;
|
||||||
|
// REVIEW: Memory Leak - 11,680 bytes in 365 blocks are indirectly lost
|
||||||
staticTriangle = new BVHStaticTriangle(_currentMaterialIndex, indices);
|
staticTriangle = new BVHStaticTriangle(_currentMaterialIndex, indices);
|
||||||
_leafRefList.push_back(LeafRef(staticTriangle, *_staticData));
|
_leafRefList.push_back(LeafRef(staticTriangle, *_staticData));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1202,6 +1202,7 @@ SGPropertyNode::getChild (const std::string& name, int index, bool create)
|
|||||||
} else if (create) {
|
} else if (create) {
|
||||||
// REVIEW: Memory Leak - 12,862 (11,856 direct, 1,006 indirect) bytes in 78 blocks are definitely lost
|
// REVIEW: Memory Leak - 12,862 (11,856 direct, 1,006 indirect) bytes in 78 blocks are definitely lost
|
||||||
SGPropertyNode* node = new SGPropertyNode(name, index, this);
|
SGPropertyNode* node = new SGPropertyNode(name, index, this);
|
||||||
|
// REVIEW: Memory Leak - 104,647 (8 direct, 104,639 indirect) bytes in 1 blocks are definitely lost
|
||||||
_children.push_back(node);
|
_children.push_back(node);
|
||||||
fireChildAdded(node);
|
fireChildAdded(node);
|
||||||
return node;
|
return node;
|
||||||
|
|||||||
@@ -288,6 +288,7 @@ Effect::~Effect()
|
|||||||
void buildPass(Effect* effect, Technique* tniq, const SGPropertyNode* prop,
|
void buildPass(Effect* effect, Technique* tniq, const SGPropertyNode* prop,
|
||||||
const SGReaderWriterOptions* options)
|
const SGReaderWriterOptions* options)
|
||||||
{
|
{
|
||||||
|
// REVIEW: Memory Leak - 35,712 bytes in 72 blocks are still reachable
|
||||||
Pass* pass = new Pass;
|
Pass* pass = new Pass;
|
||||||
tniq->passes.push_back(pass);
|
tniq->passes.push_back(pass);
|
||||||
for (int i = 0; i < prop->nChildren(); ++i) {
|
for (int i = 0; i < prop->nChildren(); ++i) {
|
||||||
@@ -490,6 +491,8 @@ void MaterialBuilder::buildAttribute(Effect* effect, Pass* pass,
|
|||||||
{
|
{
|
||||||
if (!isAttributeActive(effect, prop))
|
if (!isAttributeActive(effect, prop))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// REVIEW: Memory Leak - 20,160 bytes in 72 blocks are still reachable
|
||||||
Material* mat = new Material;
|
Material* mat = new Material;
|
||||||
const SGPropertyNode* color = 0;
|
const SGPropertyNode* color = 0;
|
||||||
if ((color = getEffectPropertyChild(effect, prop, "ambient")))
|
if ((color = getEffectPropertyChild(effect, prop, "ambient")))
|
||||||
@@ -1330,6 +1333,7 @@ InstallAttributeBuilder<DepthBuilder> installDepth("depth");
|
|||||||
void buildTechnique(Effect* effect, const SGPropertyNode* prop,
|
void buildTechnique(Effect* effect, const SGPropertyNode* prop,
|
||||||
const SGReaderWriterOptions* options)
|
const SGReaderWriterOptions* options)
|
||||||
{
|
{
|
||||||
|
// REVIEW: Memory Leak - 13,248 bytes in 72 blocks are indirectly lost
|
||||||
Technique* tniq = new Technique;
|
Technique* tniq = new Technique;
|
||||||
effect->techniques.push_back(tniq);
|
effect->techniques.push_back(tniq);
|
||||||
tniq->setScheme(prop->getStringValue("scheme"));
|
tniq->setScheme(prop->getStringValue("scheme"));
|
||||||
|
|||||||
@@ -291,6 +291,7 @@ Expression* extensionSupportedParser(const SGPropertyNode* exp,
|
|||||||
{
|
{
|
||||||
if (exp->getType() == props::STRING
|
if (exp->getType() == props::STRING
|
||||||
|| exp->getType() == props::UNSPECIFIED) {
|
|| exp->getType() == props::UNSPECIFIED) {
|
||||||
|
// REVIEW: Memory Leak - 15,552 bytes in 216 blocks are indirectly lost
|
||||||
ExtensionSupportedExpression* esp
|
ExtensionSupportedExpression* esp
|
||||||
= new ExtensionSupportedExpression(exp->getStringValue());
|
= new ExtensionSupportedExpression(exp->getStringValue());
|
||||||
int location = parser->getBindingLayout().addBinding("__contextId",
|
int location = parser->getBindingLayout().addBinding("__contextId",
|
||||||
|
|||||||
@@ -393,6 +393,7 @@ public:
|
|||||||
SGBuildingBin* bin = NULL;
|
SGBuildingBin* bin = NULL;
|
||||||
|
|
||||||
if (building_coverage > 0) {
|
if (building_coverage > 0) {
|
||||||
|
// REVIEW: Memory Leak - 317,405 (544 direct, 316,861 indirect) bytes in 4 blocks are definitely lost
|
||||||
bin = new SGBuildingBin(mat, useVBOs);
|
bin = new SGBuildingBin(mat, useVBOs);
|
||||||
randomBuildings.push_back(bin);
|
randomBuildings.push_back(bin);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user