Once upon a time there was a programming language called C. And it had 2 memory management functions:
free(). But it was too complicated.
Bjarne Stroustrup decided that C memory management should be easier. So he invented C++. In addition to
free(), C++ had
delete, destructors, RAII, auto and shared pointers.
Guido van Rossum found that C++ was also not simple enough. He chose another way and invented Python - a language which doesn't have even
Meanwhile Norwegian trolls created the C++ GUI library Qt. It simplifies memory management by deleting objects automatically when it thinks the objects are not needed.
A man called Phil Thompson was upset that a cool library like Qt doesn't exist in the excellent Python language. He combined them in the PyQt project. But it is not so easy to combine different memory management paradigms. Let's see what the pitfalls are.