[英]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. 我有一个对象
myObject
,我不确定是谁持有它的引用。 (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. 我正在使用Moose 4.6图像。
PointerExplorer openOn: myObject
works in Pharo, but it's slightly broken in Moose 4.6. PointerExplorer openOn: myObject
在Pharo中工作,但在Moose 4.6中略有不同。 For a quick fix revert ObjectExplorerWrapper >> icon
to the previous version (AlainPlantec 12/6/2009 22:13)
快速修复将
ObjectExplorerWrapper >> icon
恢复到以前的版本(AlainPlantec 12/6/2009 22:13)
In Pharo/Squeak, you can use: 在Pharo / Squeak中,您可以使用:
myObject pointersTo
在Pharo / Squeak中,您可以使用:myObject pointersTo
In Squeak 4.5 在吱吱声4.5
PointerFinder pointersTo: myObject
and 和
PointerExplorer new openExplorerFor: myObject
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.