Add object lifetime test that failed in v5.4.0
Merge branch 'add_object_lifetime_test' into develop
Fix stack memory management

From 747M to 6.2M for profiling tests.