Added solutions to memory management questions.