Pergunta de entrevista da empresa Motorola Solutions

A buggy C++ code that has shared_ptr usage and memory leak on it. When to use weak_ptr.