本文整理汇总了C++中Klass::set_next_link方法的典型用法代码示例。如果您正苦于以下问题:C++ Klass::set_next_link方法的具体用法?C++ Klass::set_next_link怎么用?C++ Klass::set_next_link使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Klass
的用法示例。
在下文中一共展示了Klass::set_next_link方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: remove_class
// This is called by InstanceKlass::deallocate_contents() to remove the
// scratch_class for redefine classes. We need a lock because there it may not
// be called at a safepoint if there's an error.
void ClassLoaderData::remove_class(Klass* scratch_class) {
MutexLockerEx ml(metaspace_lock(), Mutex::_no_safepoint_check_flag);
Klass* prev = NULL;
for (Klass* k = _klasses; k != NULL; k = k->next_link()) {
if (k == scratch_class) {
if (prev == NULL) {
_klasses = k->next_link();
} else {
Klass* next = k->next_link();
prev->set_next_link(next);
}
return;
}
prev = k;
assert(k != k->next_link(), "no loops!");
}
ShouldNotReachHere(); // should have found this class!!
}