Monday, January 25, 2010

Memory Leak Mount&blade How Do You Demonstrate A Memory Leak In C ?

How do you demonstrate a memory leak in C ? - memory leak mount&blade

How do you make a code so that no more memory leaks?

2 comments:

niknah said...

You can use valgrind to check memory leaks.
It will take a lot of memory, but can detect most memory leaks.

Stephani... said...

A memory leak occurs when you dynamically allocate memory) (with malloc () or redistribute and never free memory (using free ()).

So how to avoid memory leaks to ensure is that every time you malloc (or realloc ()) there is a corresponding free () for this variable is no longer necessary.

The chances are good that not-trivial programs that have at least one memory loss, but for most applications go in the grand scheme of things, with losses of 20 bytes every 10 minutes on a PC with 1 GB of memory, something not too much effect as the logical procedure is complex, inevitably miss some cases. The key is the best job I can assure you that the major leaks are securely connected to do.

Post a Comment