issue #5685:remove useless code in actioniterval
issue #5685: fix bugs in create function
Merge pull request #1976 from joshuastray/use_new_in_sample

Use new in sample