Code segment unload: Difference between revisions

Added Go
(Added verbiage about Perl)
(Added Go)
Line 21:
The <code>CANCEL</code> statement in COBOL unloads from memory the dynamically-loadable module containing the specified program or entry-point.
<lang cobol>CANCEL "foo"</lang>
 
=={{header|Go}}==
Although Go supports plug-ins, it is not currently possible to unload them once they have been loaded. This is likely to remain the case as runtime considerations (e.g. stopping goroutines, leaving dangling references) might make it unreliable to do so. However, any objects which the plug-in code creates on the heap will of course be garbage collected when there are no longer any references to them.
 
In practice, if a Go executable were required to run in a memory-constrained environment, the only option would be to try and divide the executable into a chain of smaller executables which would call the next one in the chain (possibly passing it some parameters) before exiting. Such chaining can be achieved using functions in the os/exec package of the standard library.
 
=={{header|Io}}==
Line 114 ⟶ 119:
{{omit from|AWK}}
{{omit from|Brlcad}}
{{omit from|Go}}
{{omit from|GUISS}}
{{omit from|Lilypond}}
9,490

edits