OTCloseProvider
Closes a provider of any type--endpoint, mapper, or service provider.C INTERFACE
OSStatus OTCloseProvider(ProviderRef ref);C++ INTERFACE
OSStatus TProvider::Close()PARAMETERS
ref- The provider reference of the provider to be closed and deleted.
DESCRIPTION
TheOTCloseProviderfunction closes the provider that you specify in therefparameter. Closing the provider deletes all memory reserved for it in the system heap, deletes its resources, and cancels any provider functions that are currently executing.Open Transport does not guarantee that all outstanding functions have completed before it closes the provider. It is ultimately your responsibility to make sure that all provider functions that you care about have finished executing, before you close and delete a provider.
- WARNING
- You need to be sure that are no outstanding
T_MEMORY_RELEASEDevents for a provider before you close the provider. Otherwise, Open Transport attempts to deliver the event to a provider that no longer exists, with unpredictable results, such as crashing the system.![]()
SEE ALSO
To create and open an endpoint, call theOTOpenEndpointfunction or theOTAsyncOpenEndpointfunction, both described in the chapter "Endpoints" in this book.To create and open a mapper, call the
OTOpenMapperfunction or theOTAsyncOpenMapperfunction, both described in the chapter "Mappers" in
this book.To create and open a AppleTalk service provider, call the
OTOpenAppleTalkServicesfunction or theOTAsyncOpenAppleTalkServicesfunction, both described in the chapter "AppleTalk Services" in this book.To create and open a TCP/IP service provider, call the
OTOpenInternetServicesfunction or theOTAsyncOpenInternetServicesfunction, both described in the chapter "TCP/IP Services" in this book.