Memory leaks

C/C++ programmers usually have problems with memory leaks, and one should known that those tiny bytes lost in you memory can lead to a big crash on your game.
Every time you run your game Make sure to always check if there is no memory leaks in your code , and if your compiler find some leaks, fix it ASAP! Do not let it for later. Later it will be hard to find, and there will be more leaks.
Besides always checking it, try avoiding them.

1) Always delete/release the objects you created

2) Do not use the "new" statement twice for the same object, and if you do, make sure to delete the older reference to the object.

3) If you point an object to another place on the memory, make sure to release the memory assigned before (if that is the case).

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.