它逐步指定如何跟踪对象分配并找到对其负责的代码行.
总结Tracking memory allocation of objects
DDMS provIDes a feature to track objects that are being allocated to memory and to see which classes and threads are allocating the objects. This allows you to track,in real time,where objects are being allocated when you perform certain actions in your application. This information is valuable for assessing memory usage that can affect application performance.
To track memory allocation of objects:
In the Devices tab,select the process that you want to enable allocation tracking for.In the Allocation Tracker tab,click the Start Tracking button to begin allocation tracking. At this point,anything you do in your application will be tracked.
Click Get Allocations to see a List of objects that have been allocated since you clicked on the Start Tracking button. You can click on Get Allocations again to append to the List new objects that that have been allocated.
To stop tracking or to clear the data and start over,click the Stop Tracking button. Click on a specific row in the List to see more detailed information such as the method and line number of the code that allocated the object.
以上是内存溢出为你收集整理的android – 如何找到创建字节数组的源代码全部内容,希望文章能够帮你解决android – 如何找到创建字节数组的源代码所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)