Hi, In my code at present I have 500 memory leaks, which is not good (for my code, or my self esteem!)
I am doing a lot of work with one particular class, which is allocating memory, so I believe that this is where the issues are starting.
One of my class member variables is declared as
private:
char* pData;
in my destructor I have the line free ((char*) pData);
WHen this line is in my code it throws up the error Damage at Normal Block (#345). If I comment out the line then the code compiles normally, but I have this memory loss.
The data was allocated (in another function) using malloc or realloc, so I know that free() is the function to use, but what am I doing wrong.
MS memory leak detection is basic, is there a free 3rd party tool I can use to at least track down these leaks to a line / file in my code that is causing them ?
Regards,
K
I am doing a lot of work with one particular class, which is allocating memory, so I believe that this is where the issues are starting.
One of my class member variables is declared as
private:
char* pData;
in my destructor I have the line free ((char*) pData);
WHen this line is in my code it throws up the error Damage at Normal Block (#345). If I comment out the line then the code compiles normally, but I have this memory loss.
The data was allocated (in another function) using malloc or realloc, so I know that free() is the function to use, but what am I doing wrong.
MS memory leak detection is basic, is there a free 3rd party tool I can use to at least track down these leaks to a line / file in my code that is causing them ?
Regards,
K