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 3349836
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:42:50+00:00 2026-05-18T01:42:50+00:00

I am implementing MKMapView based application. In that I am using an observer when

  • 0

I am implementing MKMapView based application. In that I am using an observer when we tap on a pin. the observer is code is follows,

[annView  addObserver:self
       forKeyPath:@"selected" 
       options:NSKeyValueObservingOptionNew
       context:@"ANSELECTED"];

It is working as expected, but some time it is getting exception ‘EXC_BAD_ACCESS’. My log is as follows and it is showing me a leaking memory. Do I need to release the server?. If I ? then where should I release this?

An instance 0x1b21f0 of class MKAnnotationView is being deallocated
while key value observers are still registered with it. Observation
info is being leaked, and may even become mistakenly attached to
some other object. Set a breakpoint on NSKVODeallocateBreak to stop
here in the debugger. Here's the current observation info:

<NSKeyValueObservationInfo 0x11e5f0> (
<NSKeyValueObservance 0x1b1da0: Observer: 0x120f70, Key path: selected, Options: <New: YES, Old: NO, Prior: NO> Context: 0x2b588, Property: 0x1acaa0>
  • 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-18T01:42:50+00:00Added an answer on May 18, 2026 at 1:42 am

    It is working as excepted, but some time it is getting exception ‘EXC_BAD_ACCESS’. My log is as follows and it is showing me a leaking memory. …

    An instance 0x1b21f0 of class MKAnnotationView is being deallocated while key value observers are still registered with it.
    

    That’s the opposite of a leak. It is being deallocated; a leak is when an object will never be deallocated.

    The problem is that it’s being deallocated while something else is still observing it. Anything that’s still observing this object may also send it other messages later; when it does, those messages will go to a dead object (causing the crash you saw, which happened after that message) or to a different object.

    If the object that is observing the MKAnnotationView is owning it and releasing it, it needs to remove itself as an observer before releasing it. If it does not own it, it probably should.

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

Sidebar

Related Questions

I am implementing a MKMapView based application. In that I need to get all
I am implementing MAPKit Based application, In that I had a problem with the
I am implementing a MapKit based application. I need a clarification that, it is
I am implementing an application based on the MapKit using the iPhone SDK. Now
implementing publishActivity in PHP using the REST API using this code: $activity = array(
When implementing the Strategy Pattern, where does one put the code that determines which
When implementing the using keyword to instantiate an IO.StreamWriter object does that imply that
Implementing a custom membership provider, there are certain properties such as MinRequiredPasswordLength that only
Implementing a simple Login screen using JSF and Spring and Hibernate. I have written
When implementing a hash table using a good hash function (one where the probability

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.