SomUnloadClassFile: Difference between revisions
Created page with "{{DISPLAYTITLE:somUnloadClassFile}} This method unloads a dynamically loaded class and frees the class's object. '''Note:''' For backward compatibility, this method does not ..." |
mNo edit summary |
||
Line 4: | Line 4: | ||
'''Note:''' For backward compatibility, this method does not take an Environment parameter. | '''Note:''' For backward compatibility, this method does not take an Environment parameter. | ||
; Original Class : [[SOMClassMgr]] | ;Original Class : [[SOMClassMgr]] | ||
==Syntax== | ==Syntax== | ||
Line 10: | Line 10: | ||
==Parameters== | ==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. | |||
; class (SOMClass) : A pointer to the class to be unloaded. | |||
==Return Code== | ==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== | ==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 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. | 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== | ==Example Code== | ||
==Related== | ==Related== | ||
;Methods | |||
* [[somLoadClassFile]] | * [[somLoadClassFile]] | ||
* [[somRegisterClass]] | * [[somRegisterClass]] |
Latest revision as of 18:21, 12 October 2022
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
Related
- Methods