I came to know that smart pointer is used for resource management and supports RAII.
But what are the corner cases in which smart pointer doesn\'t seem smart and things
Raymond Chen is notoriously ambivalent about smart pointers. There are issues about when the destructor actually runs (please note, the destructor runs at a well-defined time in a well-defined order; it's just that once in a while you'll forget that it's after the last line in your function).
Also remember that "smart pointer" is a pretty big category. I include std::vector
in that category (a std::vector is essentially a smart array).