• 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
Re: NSCFNumber, no pool in place - just leaking
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSCFNumber, no pool in place - just leaking


  • Subject: Re: NSCFNumber, no pool in place - just leaking
  • From: Sherm Pendley <email@hidden>
  • Date: Mon, 23 Dec 2002 17:03:32 -0500

On Monday, December 23, 2002, at 03:55 PM, Craig Bakalian wrote:

I solved this one. It is new to me. The method was called from a
standard C call, this is why it needed its own release pool, I think..

Was being called by this sucker ->

void MyReadProc(const MIDIPacketList *pktlist, void *refCon, void

That looks suspiciously like a callback function, so I'd guess that it's being called outside of the normal Cocoa event loop, in response to an incoming MIDI event.

As part of the normal Cocoa event processing, an autorelease pool is created before any code to handle the event is called, and then released after all such calls have returned. A C callback such as the above is called directly, rather than being passed through the event-handling machinery. So, as you've guessed, no autorelease pool is created before it's called - you have to create your own.

sherm--

UNIX: Where /sbin/init is Job 1.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: NSCFNumber, no pool in place - just leaking (From: Craig Bakalian <email@hidden>)

  • Prev by Date: Re: Problems with DO
  • Next by Date: Re: Determining if NS/CFDictionary is mutable?
  • Previous by thread: Re: NSCFNumber, no pool in place - just leaking
  • Next by thread: Re: NSCFNumber, no pool in place - just leaking
  • Index(es):
    • Date
    • Thread