added proper polym. mem leaks.