Memory Leak...need help

Blitz3D Forums/Blitz3D Programming/Memory Leak...need help

Orc,

The key to solving a problem of this nature is to be thoroughly logical about the search for it. You cannot afford to mess up so start one morning fresh and clear headed, determined not to stop until you find it. You will find it.

Here is how I would possibly approach this problem.

Set up a counter. Everywhere you create something, increment this counter. Everywhere you delete, free, destroy something, decrement this counter.

Run the game and check that the counter is increasing conitnually. Then you will have proved that is the problem. Until then do not believe that this is the problem. Before you attempt to spend a lot of time to solve a problem, you should first prove that the problem you think you have, actually exists in the area you believe it is in.

Then try one by one to turn off each system in you game. Watch the counter carefully. You should find the system which is causing the problem. Then remove the counter from everywhere else and leave it in just that system.

From the top, down remove the counter one by one to find the actual problem.

Hope this helps!

IPete2.