* fixed: crash when test with Monkey.

when use the Monkey to stress-test samples/Cpp/HelloCpp, the
application may crash.