iPhone: Existence of a Memory Leak Profiler?

2019-07-16 08:52发布

Is there such a thing as a Memory profiler for Iphones apps?

I'd like to know what objects are in memory at any moment.

3条回答
Explosion°爆炸
2楼-- · 2019-07-16 09:31

Shark is a memory profiler that comes with the Apple Developer Tools, it can be used with both iPhone and Mac applications. See: Shark User Guide (iPhone)

查看更多
成全新的幸福
3楼-- · 2019-07-16 09:42

Technically, I think Apple is phasing out Shark in favor of Instruments. Instruments provides memory profiling tools (allocated objects, leaks, etc...) and can connect to the iPhone Simulator or a remote device to profile iPhone apps. I've never tried to use it to show the actual objects in memory though - just allocation/deallocation activity.

查看更多
Melony?
4楼-- · 2019-07-16 09:48

You'll want to use Instruments to profile your App. You can run your app with different templates.

In XCode, select Run > Start With Performance Tool > Object Allocations

查看更多
登录 后发表回答