Instead of calling operatordelete, which is supposed to correspond to operatornew, you need to call al_destroy_bitmap() which will internally free() all of the malloc()-family allocations. In C you use malloc and family to allocate memory on the heap and free to release it. In C++ you use operatornew to allocate an object (or primitive) on the heap in the same way and invoke its constructor and you use operatordelete to call the destructor and release the memory. You cannot mix them up.

Thank's for so quick answer. I feel foolish... to forget so simple things...This, of course works, bat there is new problem: when I close application, there is an error window saying: game.exe has stopped working. In the "Wiew problem details": Fault Module Name: allegro_monolith-debug-5.1.dll.

The problem is probably using a global instance and attempting to use the destructor to clean up the objects. Allegro installs an atexit handler that shuts Allegro down, and this is likely happening before C++ gets around to calling your destructor. So Allegro is crashing because it's no longer in a functioning state. You can try a few things:

Use al_install_system instead of al_init to initialize Allegro which gives you control over when the al_uninstall_system is called (but then you should make sure it gets called, even if exceptions are thrown, etc....).

Instantiate the AssetManager as a local variable in main and pass it around. (Or as a major hack, make it a local in main, but store a pointer to it in global space...)

Move the destructor business into a method that you can call early that will destroy the internal state and mark the asset manager "disposed" so it doesn't repeat this when the destructor is called (based on .NET's IDisposable interface). Call this method from the destructor, and then call this method before main exits to make sure it happens before Allegro is deinitialized. Example:

To be safe you could guard the rest of the methods to refuse to do anything if the object is disposed. Or you could just document that using the object after it has been disposed is undefined/bad and don't do that.