Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Memory Leaks in my C Program.
Index -> Programming, C -> C Help
Goto page Previous  1, 2
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Natsu




PostPosted: Tue Oct 16, 2012 7:46 pm   Post subject: RE:Memory Leaks in my C Program.

I tried that, its like everytime I add a free, I get more mem leaks and if I remove some free's I sometimes get less or more.
Sponsor
Sponsor
Sponsor
sponsor
md




PostPosted: Wed Oct 17, 2012 7:28 am   Post subject: RE:Memory Leaks in my C Program.

Adding a free at random won't help you at all. You need to free everything you allocate in reverse order.

Since you're using windows and VisualStudio, look here http://stackoverflow.com/questions/413477/is-there-a-good-valgrind-substitute-for-windows for a list of potential valgrind alternatives.
ncvitak




PostPosted: Sun Jun 09, 2013 6:03 pm   Post subject: Re: Memory Leaks in my C Program.

If you have access to Apple's Xcode IDE, you can Analyze your program for memory leaks during runtime, and Xcode will highlight in blue, where your memory leaks are located in your code.
Display posts from previous:   
   Index -> Programming, C -> C Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 2 of 2  [ 18 Posts ]
Goto page Previous  1, 2
Jump to:   


Style:  
Search: