在最新的Android更新(SDK 21)中,似乎有2个新变量已添加到java.lang.Object中:
private transient Class> shadow$_klass_;
private transient int shadow$_monitor_;
我注意到shadow $ _monitor_在hashCode()中简要使用:
public int hashCode() {
int lockWord = shadow$_monitor_;
final int lockWordMask = 0xC0000000; // Top 2 bits.
final int lockWordStateHash = 0x80000000; // Top 2 bits are value 2 (kStateHash).
if ((lockWord & lockWordMask) == lockWordStateHash) {
return lockWord & ~lockWordMask;
}
return System.identityHashCode(this);
}
但是否则没有提到他们。他们在艺术中与GC有什么关系吗?还是某种本地的东西?