Re: finding out if pointer to memory is valid

Discussion in 'C++' started by Ron Natalie, Jun 26, 2003.

  1. Ron Natalie

    Ron Natalie Guest

    "Schelli" <> wrote in message news:...

    >
    > can i somehow find out that the memory this pointer is pointing to was
    > deleted ? or do i just have to find a way to set the other pointer to
    > NULL so i know.


    There is no way to determine if a pointer points to something valid
    or not. You'll need to keep track of it seperately (either whether it
    is deleted, or have reference count so that the object is not deleted
    while people are still using it).
     
    Ron Natalie, Jun 26, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sin
    Replies:
    1
    Views:
    1,081
    Ron Natalie
    Jun 26, 2003
  2. Alexander Terekhov

    Re: finding out if pointer to memory is valid

    Alexander Terekhov, Jun 27, 2003, in forum: C++
    Replies:
    0
    Views:
    753
    Alexander Terekhov
    Jun 27, 2003
  3. Dhruv
    Replies:
    0
    Views:
    698
    Dhruv
    Jun 27, 2003
  4. Ron Natalie
    Replies:
    0
    Views:
    771
    Ron Natalie
    Jun 27, 2003
  5. sfs
    Replies:
    3
    Views:
    300
Loading...

Share This Page