I am trying to implement decorater design pattern. But I found my program has memory leak. so I modified it but now It has stopped working. please can anyone help what I am doing wrong.
Thanks buddy, but if I remove the lines 40,41 and 71,72 the program works. but there are memory leaks. Please can you tell me a way by which I can avoid those memory leaks.
I tried removing line 53/84, but it gave me memory leaks... I am using visual studio 2008. But after your solution for 43/74. It worked. thank you guys. :)