Skip to content

诸如 wp_loop 这样命名的变量,前缀 wp 是什么意思? #36

Answered by lucas-law
Gwill asked this question in Q&A
Discussion options

You must be logged in to vote

诸如 wp_loop 这样命名的变量,前缀 wp 是什么意思?

为了区分成员变量的所有权,如果不是此对象持有的成员,仅仅是引用,则用wp_loop表示,如过改对象持有loop的整个生命周期,则用sp_loop表示。 (从智能指针中得到启发。)

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by lucas-law
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants