SOM Kernel Reference 1-123
somUnloadClassFile Method
Purpose
Unloads a dynamically loaded class and frees the class’s object.
IDL Syntax
long somUnloadClassFile (in SOMClass class);
Note: For backward compatibility, this method does not take an Environment parameter.
Description
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.
Parameters
receiver Usually SOMClassMgrObject (or a pointer to an instance of a
user-supplied subclass of SOMClassMgr).
class A pointer to the class to be unloaded.
Return Value
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 or the Windows FreeLibrary system call.
Original Class
SOMClassMgr
Related Information
Methods: somClassFromId, somRegisterClass, somUnregisterClass,
somGetRelatedClasses
Kommentare zu diesen Handbüchern