dummy_main: prevent periodic_task from capturing ref. to local.
dummy_main: prevent periodic_task from capturing ref. to local.

This probably didn't blow up in our face due to RVO (the address of the
region doesn't change after the return because it is constructed at the
location where it is returned), but it is wrong in every way.

Capturing a shared_ptr to the region may look like a reference cycle,
but isn't one because the region in no way owns the periodic_task.

FlexCoreLib/flexcore,CasparKielwein/flexcore