简体   繁体   中英

How can I find all objects that reference myObject?

I have an object myObject and I'm not sure who's holding references to it. (I want to know because I'm reverse engineering something.)

I found the button "Objects pointing to this value" in the inspector, but it doesn't bring up anything, even if I make another object that's pointing, like this:

OrderedCollection new add: self ; inspect

Clearly, that button is broken! So, how can I get all referencing objects?

I'm using the Moose 4.6 image.

PointerExplorer openOn: myObject works in Pharo, but it's slightly broken in Moose 4.6. For a quick fix revert ObjectExplorerWrapper >> icon to the previous version (AlainPlantec 12/6/2009 22:13)

In Pharo/Squeak, you can use:

myObject pointersTo

在Pharo / Squeak中,您可以使用:myObject pointersTo

In Squeak 4.5

PointerFinder pointersTo: myObject

and

PointerExplorer new openExplorerFor: myObject

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM