Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

visual C++ code check

Status
Not open for further replies.

wetarded1

Programmer
Jun 14, 2005
2
US
Hi... I had a quick question, I hope someone can answer it. I have a C++ file that creates an OCX. I am wondering if anyone knows of a good (read: free or free trial) program to check that memory is being freed up? Most of the code that is written in the C++ file was something I did not write and I do not feel like reading through the many, many lines to make sure that the variables are cleared out of memory as needed. Any help would be greatly appreciated.

Thanks,
Tom
 
> I am wondering if anyone knows of a good (read: free or free trial)

Reading "Free":
You can use the task manager in Windows to see applications' resource allocations.



/Per

www.perfnurt.se
 
I realize that. but I am looking for something a bit more indepth. This software will be used in a high volume area, but I can not simulate that. I am hoping to find a tool that will scan the code and alert me if there are variables that are suspended.
 
You could also have your own version of new and delete which you could use to monitor memory usage and display geriatric logs of variables that are holding on to memory. This is a lot easier in gcc than on Microsoft - they have something that gives you the call stack in text form otherwise you'll have to use the map generated by the link to work this one out.

Alternatively, if you're using malloc and free, it is even easier. malloc and free can be #defined to include __FILE__ and __LINE__ in a call to your routines.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top