Fixed memory leak in Stack pop() method.