SomUnloadClassFile

This method unloads a dynamically loaded class and frees the class's object.

Note: For backward compatibility, this method does not take an Environment parameter.


 * Original Class : SOMClassMgr

Syntax
long somUnloadClassFile (SOMClassMgr receiver, SOMClass class)

Parameters

 * receiver (SOMClassMgr) : Usually SOMClassMgrObject (or a pointer to an instance of a user-supplied subclass of SOMClassMgr).


 * class (SOMClass) : A pointer to the class to be unloaded.

Return Code

 * rc (long) : The somUnloadClassFile method returns 0 if the class was successfully unloaded; otherwise, it returns a system-specific non-zero error code from either the OS/2 DosFreeModule or the AIX unload system call.

Remarks
The somUnregisterClass method uses the somUnloadClassFile method to unload a dynamically loaded class. This releases the class's code and unregisters all classes in the same affinity group. (Use somGetRelatedClasses to find out which other classes are in the same affinity group.)

The class object is freed whether or not the class' s shared library could be unloaded. If the class was not registered, an error condition is raised and SOMError is invoked. This method is provided to permit user-created subclasses of SOMClassMgr to handle the unloading of classes by overriding this method. Do not invoke this method directly; instead, invoke somUnregisterClass.

Example Code
 

Methods

 * somLoadClassFile
 * somRegisterClass
 * somUnregisterClass
 * somGetRelatedClasses