iOS disk space starts filling up when app opened

This is strange and I can't find out anything on internet. I have integrated Firebase Crashlytics and Analytics in my camera app using AVFoundation. Once the available device space on device runs less than 500 MB, weird things start happening. The moment I debug my app, within minutes the disk space on device starts shooting up until there is no space left on device. On iOS 14 beta 4 device, it caused iOS to crash and stuck in boot loop forever. But today I am able to reproduce the issue even on another device running iOS 13.5 which is strange. I managed to kill the app and started deleting files & apps to clear space. Is anyone aware of this issue? Feels very strange and the behaviour occurs when there is less than 500 MB storage left on device. For the iOS 14 beta, I have filed a bug with Apple. But now seeing the same issue on other device running iOS 13, it feels strange. Is there any way to debug why is disk space going up when app is opened? Although its an issue with iOS which occurs when available disk space is less than 500 MB, I still need to debug who is eating disk space on device in the background?

EDIT: I see I had malloc guard and malloc stack enabled along with zombies in the scheme. Does that cause issues with disk space?
Try profiling your app using the File Activity instrument.
Yes, Zombies will cause all objects to never be fully deallocated.
Dear Apple Engineers, thanks for replying. I found that tmp folder was growing by leaps and bounds and had to clear gigabytes of space by removing everything in tmp folder. My question now is why iOS never deleted storage in the tmp folder? Doesn't iOS periodically clear space in tmp folder?
Why is your app writing gigabytes of data to the tmp folder in the first place? If you don't know, follow that clue and reduce the amount of data being written.
iOS disk space starts filling up when app opened
 
 
Q