Is it possible see all the references to an object in execution time?

前端 未结 4 1597
我寻月下人不归
我寻月下人不归 2020-12-03 01:36

Is there a way to see all the references to an object in execution time?

I\'m using Netbeans, does this feature exist in it?

EDIT: No problem in using profil

4条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-03 02:01

    If you dump the heap and analyse it you get find all the references. Profilers like VisualVM and YourKit can do this for you.

    However its not possible to determine this dynamically. If you want to know all the things which refer to an object you must maintain a collection these yourself.

提交回复
热议问题