• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Strange Memory leak
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Strange Memory leak


  • Subject: Strange Memory leak
  • From: Jerrod Fowkes <email@hidden>
  • Date: Tue, 16 May 2006 12:50:04 -0700 (PDT)

Hello,

Consider this code:

      NSLog(@"%d", [[[[self result] allValues] objectAtIndex: 0] retainCount]);
       //prints  2
    WSMethodInvocationUnscheduleFromRunLoop(soapCall, CFRunLoopGetCurrent(), (CFStringRef)NSDefaultRunLoopMode);

      NSLog(@"%d", [[[[self result] allValues] objectAtIndex: 0] retainCount]);
//prints 3

I have spent the greater part of the day figuring out a memory leak. I think I have found it. Before this code gets called, I call a web service asyncronously and I loop until it calls my delegate, and I set the result in there. When it returns it comes back to the code above. the retain count of 2 is correct, when it unschedules the runloop, it's 3, which isn't correct. Why would *Unschedule* mess around with my result memory?
-Jerrod



---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great rates starting at 1&cent;/min.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Strange Memory leak
      • From: j o a r <email@hidden>
  • Prev by Date: CoreRecipeApp sample still broken under 10.4.6
  • Next by Date: NSWindow shadow
  • Previous by thread: CoreRecipeApp sample still broken under 10.4.6
  • Next by thread: Re: Strange Memory leak
  • Index(es):
    • Date
    • Thread