0

I have a PFObject "A", one of the fields in A is a pointer to PFObject "B".

So, if I delete B, A still keeps the old pointer to B.

How can I clear out the pointer to PFObject B found in PFObject A?

4
  • "When I try to delete the pointer in A...", which code are you using? aPFObject.bPFObject = nil; ? Commented Jul 7, 2014 at 1:53
  • @gothicdev: I edited the question shortly after I posted it. I think I wasn't too clear about it. I am deleting B, so now I want to delete the pointer that A still has to B. It does not go away by deleting B. Not sure I am understanding how to handle this scenario. Commented Jul 7, 2014 at 1:59
  • 1
    You need to get A and use 'removeObjectForKey' to remove pointer to B. Commented Jul 7, 2014 at 2:36
  • @knshn: if you make this an answer I'll mark it as the right one. It works. Commented Jul 7, 2014 at 4:13

1 Answer 1

1

If you delete B, it doesn't delete the pointer from A to B. So, first you need to get A, and then use removeObjectForKey to remove the pointer.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.