8

I made an app which is 40 MB (very big for me).

But the real surprise is that I found the tmp directory is 300 MB!

And I haven't saved any files in the document yet!

All the files' names in tmp are like:

stack-logs.80127.MyAppName.index
stack-logs.80163.MyAppName.vwnxgi.link
...

What are these things? They occupied an unbelievably 300 MB size!

Is there a way I can clear them periodically? Or is this because I'm debugging my app on my iPhone?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Wang Liang
  • 941
  • 2
  • 15
  • 34

2 Answers2

21

Edit you target scheme, and close LoggingMalloc Stack. Uncheck it.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
TonnyTao
  • 532
  • 1
  • 5
  • 8
0

The NSTemporaryDirectory() function returns a path to the temporary directory for the current user (not just the application's), so these 300 MB are probably files from other applications using the temporary storage.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Alexander
  • 8,117
  • 1
  • 35
  • 46