Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7512147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T23:46:37+00:00 2026-05-29T23:46:37+00:00

Observing Naked Pointers (see the first reply), the questions is pretty simple: what is

  • 0

Observing Naked Pointers (see the first reply), the questions is pretty simple:

what is a Naked Pointer?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T23:46:39+00:00Added an answer on May 29, 2026 at 11:46 pm

    Here’s simple example:

    #include <memory>
    
    struct X { int a,b,c; };
    
    int main()
    {
        std::shared_ptr<X> sp(new X);
        X* np = new X;
        delete np;
    }
    

    np is pointer to object of type X – if you have dynamically allocated (new / malloc) this object, you have to delete / free it… simple pointer like np is called “naked pointer”.

    sp is an object that holds a pointer to the managed resource, which means you can use it just like you would use np, but when there are no shared_ptr objects that own this resource, the resource is freed, so you don’t have to delete it. Smart pointers take care of memory management, so you don’t have to 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can someone explain in simple terms what is Key-Value-Coding and Key-Value-Observing ? Please don't
I'm using this simple code and observing monotonically increasing memory usage. I'm using this
What's the most simple way to implement a plain data object which conforms key-value-observing?
I am observing a crash while calling the CMemFile::Detach() function The exception with the
We are observing 4-6 threads on Windows 7 x64 in the application which have
I am trying to get key-value-observing to work for an NSMutableArray. Below is the
I'm using key value observing on a boolean property an NSObject method: -(void)observeValueForKeyPath:(NSString *)keyPath
I started dealing with NSOperations and (as usual with concurrency) I'm observing strange behaviour.
From observing source code for various Android applications (not written by me), I noticed
I am observing a different output from a C++ compiled binary file, that calls

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.