Added functions safeAsyncInvokeInt, safeAsyncInvokeString that send int or string to callback only if destructor has not been called.
Replaced flash_callback with safeAsyncInvokeInt in function doflash.