wrapped handler with @autoreleasepool to prevent leaks on Linux.