Checking for memory leaks.. only active in debug mode since it's so inaccurate
This commit is contained in:
parent
83faeeebb3
commit
d3366b0267
11
main.cpp
11
main.cpp
|
@ -1008,11 +1008,14 @@ void CheckMemoryLeak()
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// This is highly inaccurate at the moment
|
// This is highly inaccurate at the moment
|
||||||
if (varlist[i]->value == _variable::New || varlist[i]->value == _variable::NewA)
|
if (Debug)
|
||||||
{
|
{
|
||||||
std::ostringstream ostr;
|
if (varlist[i]->value == _variable::New || varlist[i]->value == _variable::NewA)
|
||||||
ostr << FileLine(it->Token) << ": Memory leak:" << VariableNames[varlist[i]->varindex];
|
{
|
||||||
ReportErr(ostr.str());
|
std::ostringstream ostr;
|
||||||
|
ostr << FileLine(it->Token) << ": Memory leak:" << VariableNames[varlist[i]->varindex];
|
||||||
|
ReportErr(ostr.str());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete this instance..
|
// Delete this instance..
|
||||||
|
|
Loading…
Reference in New Issue