fixed autorelease pool problem with memory