[offline][client][managed] Optimize memory usage in test apps to prevent...

... crash with out-of-memory exception