cppcheck/testmemleak1/testmemleak1.cpp

24 lines
242 B
C++

class clKalle
{
private:
char *str;
char *str2;
public:
clKalle();
~clKalle();
};
clKalle::clKalle()
{
str = new char[10];
str2 = new char[10];
}
clKalle::~clKalle()
{
delete [] str2;
}