Compiled methods
You can unload compiled methods into an image component file or byte array without unloading any classes. However, to load the methods, the target image must hold classes having the same definitions as those used for the methods in the source image. The system sets source code pointers to void during unloading.
To unload methods, you use the method dumpMethods: contained in ApplicationDumper.
Two examples illustrate how to unload methods
Prior to executing the code in any of these examples, load packaging instructions and create an instance of EaComponentMapManager called ComponentMaps by executing Step 1 of Example: Unloading an application and its subapplications.
 
Example: Unloading one method
To unload the compiled method at: contained in the class Object into an image component file, you evaluate:
"Step 2: Unload the compiled method at: into at.ic."
| result |
(result := ApplicationDumper new)
dumpMethods: (Array with: Object>>#at:);
dumpIntoFileNamed: 'at.ic' path: '.' using: ComponentMaps.
Example: Unloading many methods
To unload the compiled methods at: and new contained in the class Object into an image component file, you evaluate:
"Step 2: Unload the compiled methods at: and new into obj.ic."
| result |
(result := ApplicationDumper new)
dumpMethods: (Array
with: Object>>#at:;
with: Object>>#new);
dumpIntoFileNamed: 'obj.ic' path: '.' using: ComponentMaps.
Last modified date: 01/29/2015