在 Visual Studio 中调试时的 Px、Pn
Px, Pn when Debugging in Visual Studio
在 Visual Studio 中调试 C++ 时,如果将监视添加到对象上,您会看到 'px' 和 'pn' 作为其直接子对象。
我一直读 'px' 表示指向实际对象的指针,但我很好奇这些 'px'、'pn' 和 'pi' 代码实际上是什么缩写?
我想你看到的是 boost::shared_ptr
实例的内容,它确实包含 px
和 pn
成员:
element_type * px; // contained pointer
boost::detail::shared_count pn; // reference counter
因此,这些不是某种神奇的调试器变量,而是真实的 class 字段,您不会在常规对象中看到它们。
在 Visual Studio 中调试 C++ 时,如果将监视添加到对象上,您会看到 'px' 和 'pn' 作为其直接子对象。
我一直读 'px' 表示指向实际对象的指针,但我很好奇这些 'px'、'pn' 和 'pi' 代码实际上是什么缩写?
我想你看到的是 boost::shared_ptr
实例的内容,它确实包含 px
和 pn
成员:
element_type * px; // contained pointer
boost::detail::shared_count pn; // reference counter
因此,这些不是某种神奇的调试器变量,而是真实的 class 字段,您不会在常规对象中看到它们。