spoddynerd
Programmer
The following code results in lint error 534 (see code comment). It only happens when SomeClass is a template class and contains an instance of VectorInt.
I can't see what is wrong with this, and Purify doesn't seem to pick up any memory leaks.
template <class T>
class SomeClass
{
public:
SomeClass() : vectorInt() {};
~SomeClass(){};
typedef std::vector<int> VectorInt;
private:
VectorInt vectorInt;
};
void main(void)
{
for(;
{
SomeClass<int>* someClass = new SomeClass<int>(); //causes pc lint error 534 - ignoring return value from new
delete someClass;
}
}
I can't see what is wrong with this, and Purify doesn't seem to pick up any memory leaks.
template <class T>
class SomeClass
{
public:
SomeClass() : vectorInt() {};
~SomeClass(){};
typedef std::vector<int> VectorInt;
private:
VectorInt vectorInt;
};
void main(void)
{
for(;
{
SomeClass<int>* someClass = new SomeClass<int>(); //causes pc lint error 534 - ignoring return value from new
delete someClass;
}
}