Morgan Stanley Interview Question

when do you use smart pointer?