No, in C++, we cannot explicitly call a destructor on a local variable. The destructor is automatically invoked when the scope of the local variable ends or when the variable goes out of scope.
Attempting to call the destructor explicitly would lead to a compilation error. C++ ensures automatic memory management by automatically invoking the destructor when objects are no longer in use, which helps prevent memory leaks and ensures proper resource deallocation. Instead, developers can focus on proper object instantiation and let C++ handle the destruction process efficiently, adhering to the language's design principles and best practices.