Fix memory leaks and suppress compiler warnings

I found some memory leaks and compiler warnings remaining.
It maybe better to supress them for comfortable coding.