• 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: Creating multiple OT Contexts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating multiple OT Contexts


  • Subject: Re: Creating multiple OT Contexts
  • From: Quinn <email@hidden>
  • Date: Fri, 11 Apr 2003 09:27:48 +0100

At 16:42 +0100 10/4/03, Mark Thomas wrote:
Ideally I will be clearing the context out, when I use
kInitOTForExtensionMask mask, but if I crash out, what the worst things that
can happen about from loosing some memory. I guess MacOS-X it wont matter ,
but under classic I loose some system memory.

Under Mac OS X, it won't matter.

Under Mac OS 9, you will leak some memory and can potentially cause the system to crash. For example, if data arrives on an endpoint with a notifier installed, the system will call the notifier, which is no longer loaded into memory.

The correct thing to do is to call CloseOpenTransportInContext from your fragment termination routine. Fragment terminators are called regardless of whether the app quits cleanly or not.

As an aside, it's important that you do this for kInitOTForExtensionMask only. kInitOTForApplicationMask contexts are cleaned up by the system and you should rely on that. If you try to clean up a kInitOTForApplicationMask context in a fragment termination routine, bad things will happen (because OT's ExitToShell patch has already run and cleaned up your application context).

In summary:

o When running on Mac OS X--do nothing.

o kInitOTForApplicationMask on traditional Mac OS--do nothing.

o kInitOTForExtensionMask on traditional Mac OS--clean up in yor fragment termination routine.

S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Technical Support * Networking, Communications, Hardware
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Creating multiple OT Contexts (From: Mark Thomas <email@hidden>)

  • Prev by Date: Re: OT: inter-application communication and internet protocols
  • Next by Date: Re: Identifying port names for users
  • Previous by thread: Re: Creating multiple OT Contexts
  • Next by thread: Is it thread safe ?
  • Index(es):
    • Date
    • Thread