Storage Management

The License Provider API is pointer based, with the storage for the TLicenseProvider and TLicenseProviderSession objects being adopted by the Licensing framework. To make it easier for the Licensing framework to avoid storage leaks, TLicenseProvider and TLicenseProviderSession both derive from the MReferenceCounted base class. This places a requirement upon the provider's implementation to not directly call the destructor of either TLicenseProvider or TLicenseProviderSession. Instead, their RemoveReference members should be called. In addition, any code keeping copies of pointers to objects of either class should bound the lifetime of each pointer's copy with an AddReference/RemoveReference pair, preferably automating these calls by using an appropriate CommonPoint application system template class (such as TCountedPointerTo) from SmartPointers.h.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker