Fixed Memory Leaks in iOS library file.