Observing Naked Pointers (see the first reply), the questions is pretty simple:
what is a Naked Pointer?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here’s simple example:
npis pointer to object of typeX– if you have dynamically allocated (new/malloc) this object, you have todelete/freeit… simple pointer likenpis called “naked pointer”.spis an object that holds a pointer to the managed resource, which means you can use it just like you would usenp, but when there are noshared_ptrobjects that own this resource, the resource is freed, so you don’t have todeleteit. Smart pointers take care of memory management, so you don’t have to 😉