Fixed memory leaks in CText