What is the purpose of a destructor in C++? Explain how destructors contribute to resource management and memory cleanup in object-oriented programming. Discuss scenarios where destructors are particularly important and the implications of not using them correctly.