I always forget freeing a memory that allocated from the heap.And I always forget closing the file handler.
Resources include file descriptors, mutex locks, fonts, brushes, database connections and network sockets.
I think less programmers can remember closing a file handler, especially in a large project.
Nowadays, many programming languages have the garbage collection function. In C++, since the destructor will be automatically called, we can release the resources automatically if we put the resource into an object.