I mean, I would like to check memory leaks, since I use do use pointers. I can't help it, they're helpful.
Of course, I also use them. But you should not use raw pointers that
own objects and therefore imply manual memory management, since it's inherently error-prone and there are easy-to-use alternatives.
Take a look at my link in the last post, it shows nicely how to replace low-level techniques with modern alternatives. The RAII (resource acquisition is initialization) idiom means that every resource, including memory, is contained by an object that is responsible for its construction and destruction. That is, you don't explicitly need to destroy or deallocate objects.
// Manual resource management
MyClass* p = new MyClass;
delete p;
sf::Mutex mutex;
mutex.lock();
mutex.unlock();
FILE* f = fopen(...);
fclose(f);
// RAII - everything is cleaned up automatically at scope exit
std::unique_ptr<MyClass> p(new MyClass);
// calls delete
sf::Mutex mutex;
sf::Lock lock(mutex);
// calls unlock()
std::fstream f(...);
// calls close()
The great advantage is that cleanup is guaranteed, independent of how complex your code is, how many return paths you use and how many exceptions are thrown. You can also take a look at
another example I wrote some time ago. It shows the limits of manual memory management and the advantages of RAII. I can not recommend enough to take a look at modern C++ idioms, it will greatly improve your code!