Fix object autorelease bugs to release memory.