HW2:task2:dealed with memory leak & removed empty constructors