changeset 30752:d31d4f2504de

maint: Merge stable to default.
author John W. Eaton <jwe@octave.org>
date Thu, 17 Feb 2022 22:42:22 -0500
parents 2f6904439d3c (current diff) 71ca1db02426 (diff)
children 6b7aaec96057
files libinterp/corefcn/interpreter.cc libinterp/corefcn/module.mk libinterp/dldfcn/audiodevinfo.cc libinterp/octave-value/ov-base.h libinterp/parse-tree/pt-eval.cc
diffstat 11 files changed, 424 insertions(+), 303 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/languages/zh_CN.ts	Tue Feb 15 18:57:16 2022 +0100
+++ b/libgui/languages/zh_CN.ts	Thu Feb 17 22:42:22 2022 -0500
@@ -59,12 +59,12 @@
     <message>
         <location filename="../src/settings-dialog.cc" line="+845"/>
         <source>Difference to the default size</source>
-        <translation>和默认大小的差别</translation>
+        <translation>和默认大小的差值</translation>
     </message>
     <message>
         <location line="+6"/>
         <source>Background color, pink (255, 0, 255) means default</source>
-        <translation>背景颜色,粉红色 (255,0,255) 代表默认值 {255, 0, 255)?}</translation>
+        <translation>背景颜色,粉红色 (255,0,255) 代表默认值</translation>
     </message>
     <message>
         <location line="+2"/>
@@ -537,12 +537,12 @@
     <message>
         <location line="+3"/>
         <source>Task marker</source>
-        <translation type="unfinished">任务标记</translation>
+        <translation>任务标记</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Inactive task marker</source>
-        <translation type="unfinished">非活动的任务标记</translation>
+        <translation>非活动的任务标记</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -600,22 +600,22 @@
     <message>
         <location line="+3"/>
         <source>Added adding patch</source>
-        <translation type="unfinished">已添加的添加补丁</translation>
+        <translation>已添加的新增补丁</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Removed adding patch</source>
-        <translation type="unfinished">已移除的添加补丁</translation>
+        <translation>已移除的新增补丁</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Added removing patch</source>
-        <translation type="unfinished">已添加的移除补丁</translation>
+        <translation>已添加的删除补丁</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Removed removing patch</source>
-        <translation type="unfinished">已移除的移除补丁</translation>
+        <translation>已移除的删除补丁</translation>
     </message>
 </context>
 <context>
@@ -1108,27 +1108,27 @@
     <message>
         <location filename="../src/command-widget.cc" line="+57"/>
         <source>Pause</source>
-        <translation type="unfinished"></translation>
+        <translation>暂停</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Stop</source>
-        <translation type="unfinished">停止</translation>
+        <translation>停止</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Continue</source>
-        <translation type="unfinished">继续</translation>
+        <translation>继续</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Command Input</source>
-        <translation type="unfinished"></translation>
+        <translation>命令输入</translation>
     </message>
     <message>
         <location line="+9"/>
         <source>Command Output</source>
-        <translation type="unfinished"></translation>
+        <translation>命令输出</translation>
     </message>
 </context>
 <context>
@@ -1136,7 +1136,7 @@
     <message>
         <location filename="../src/community-news.cc" line="+70"/>
         <source>Octave Community News</source>
-        <translation type="unfinished">Octave 社区新闻</translation>
+        <translation>Octave 社区新闻</translation>
     </message>
 </context>
 <context>
@@ -1191,7 +1191,7 @@
     <message>
         <location line="+22"/>
         <source>Bookmarks</source>
-        <translation type="unfinished"></translation>
+        <translation>书签</translation>
     </message>
     <message>
         <location line="+86"/>
@@ -1257,7 +1257,7 @@
     <message>
         <location line="+55"/>
         <source>Bookmark current page</source>
-        <translation type="unfinished"></translation>
+        <translation>为此页面添加书签</translation>
     </message>
     <message>
         <location line="+430"/>
@@ -1271,62 +1271,63 @@
         <location filename="../src/documentation-bookmarks.cc" line="+102"/>
         <source>
 No documentation bookmarks loaded!</source>
-        <translation type="unfinished"></translation>
+        <translation>
+没有文档书签被加载!</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Octave: Loading Documentation Bookmarks</source>
-        <translation type="unfinished"></translation>
+        <translation>Octave: 载入文档书签中</translation>
     </message>
     <message>
         <location line="+10"/>
         <source>Enter text to search the bookmarks</source>
-        <translation type="unfinished"></translation>
+        <translation>输入文本搜索书签</translation>
     </message>
     <message>
         <location line="+25"/>
         <source>Filter</source>
-        <translation type="unfinished">过滤器</translation>
+        <translation>过滤器</translation>
     </message>
     <message>
         <location line="+83"/>
         <source>New Folder</source>
-        <translation type="unfinished"></translation>
+        <translation>新建文件夹</translation>
     </message>
     <message>
         <location line="+105"/>
         <source>&amp;Open</source>
-        <translation type="unfinished"></translation>
+        <translation>打开 (&amp;O)</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>&amp;Rename</source>
-        <translation type="unfinished"></translation>
+        <translation>重命名 (&amp;R)</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Remo&amp;ve</source>
-        <translation type="unfinished"></translation>
+        <translation>删除 (&amp;V)</translation>
     </message>
     <message>
         <location line="+5"/>
         <source>&amp;Add Folder</source>
-        <translation type="unfinished"></translation>
+        <translation>添加文件夹 (&amp;A)</translation>
     </message>
     <message>
         <location line="+6"/>
         <source>Hide &amp;Filter</source>
-        <translation type="unfinished"></translation>
+        <translation>隐藏过滤器 (&amp;F)</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Show &amp;Filter</source>
-        <translation type="unfinished"></translation>
+        <translation>显示过滤器 (&amp;F)</translation>
     </message>
     <message>
         <location line="+61"/>
         <source>Octave: Saving Documentation Bookmarks</source>
-        <translation type="unfinished"></translation>
+        <translation>Octave: 保存文档书签</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -1335,31 +1336,39 @@
 
 Documentation bookmarks are not saved!
 </source>
-        <translation type="unfinished"></translation>
+        <translation>无法写入文件 %1:
+%2.
+
+文档书签未保存!
+</translation>
     </message>
     <message>
         <location line="+55"/>
         <source>Unable to read file %1:
 %2.</source>
-        <translation type="unfinished"></translation>
+        <translation>无法读取文件 %1:
+%2.</translation>
     </message>
     <message>
         <location line="+10"/>
         <source>No start element found in %1.
 Invalid bookmark file?</source>
-        <translation type="unfinished"></translation>
+        <translation>文件 %1 中找不到起始元素。
+是否是无效的标签文件?</translation>
     </message>
     <message>
         <location line="+9"/>
         <source>The file
 %1
 is not a valid XBEL file verison 1.0.</source>
-        <translation type="unfinished"></translation>
+        <translation>文件
+%1
+不是一个有效的 XBEL 文件版本 1.0。</translation>
     </message>
     <message>
         <location line="+26"/>
         <source>Unknown title</source>
-        <translation type="unfinished"></translation>
+        <translation>未知标题</translation>
     </message>
 </context>
 <context>
@@ -1466,7 +1475,7 @@
 does not exist. Do you want to create it?</source>
         <translation>文件
 %1
-不存在。你希望创建它吗?</translation>
+不存在。您希望创建它吗?</translation>
     </message>
     <message>
         <location line="+4"/>
@@ -1710,7 +1719,7 @@
     <message>
         <location line="+4"/>
         <source>Toggle &amp;Bookmark</source>
-        <translation>打开/关闭书签 (&amp;B)</translation>
+        <translation>切换书签 (&amp;B)</translation>
     </message>
     <message>
         <location line="+4"/>
@@ -1805,7 +1814,7 @@
     <message>
         <location line="+4"/>
         <source>Toggle &amp;Breakpoint</source>
-        <translation>打开/关闭断点 (&amp;B)</translation>
+        <translation>切换断点 (&amp;B)</translation>
     </message>
     <message>
         <location line="+5"/>
@@ -1870,7 +1879,7 @@
     <message>
         <location line="+49"/>
         <source>Copy Full File &amp;Path</source>
-        <translation type="unfinished"></translation>
+        <translation>复制完整的文件路径 (&amp;P)</translation>
     </message>
     <message>
         <location line="+17"/>
@@ -2099,7 +2108,9 @@
         <source>%1
  already exists
 Do you want to overwrite it?</source>
-        <translation type="unfinished"></translation>
+        <translation>%1
+ 已经存在
+您确定要覆盖它吗?</translation>
     </message>
     <message>
         <location line="+85"/>
@@ -2319,12 +2330,12 @@
     <message>
         <location line="+12"/>
         <source>Rename error</source>
-        <translation type="unfinished"></translation>
+        <translation>重命名错误</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Could not rename file &quot;%1&quot; to &quot;%2&quot;.</source>
-        <translation type="unfinished"></translation>
+        <translation>无法将文件 &quot;%1&quot; 重命名为 &quot;%2&quot;。</translation>
     </message>
     <message>
         <location line="+30"/>
@@ -2337,13 +2348,14 @@
         <location line="-27"/>
         <source>Are you sure you want to delete all %1 selected files?
 </source>
-        <translation type="unfinished"></translation>
+        <translation>您确定要删除所有 %1 选择的文件吗?
+</translation>
     </message>
     <message>
         <location line="+11"/>
         <source>Are you sure you want to delete
 </source>
-        <translation>你确实希望删除
+        <translation>您确定要删除
 </translation>
     </message>
     <message>
@@ -2354,12 +2366,12 @@
     <message>
         <location line="+12"/>
         <source>Deletion error</source>
-        <translation type="unfinished"></translation>
+        <translation>删除错误</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Could not delete file &quot;%1&quot;.</source>
-        <translation type="unfinished"></translation>
+        <translation>无法删除文件 &quot;%1&quot;。</translation>
     </message>
     <message>
         <location line="+185"/>
@@ -2377,7 +2389,7 @@
 </source>
         <comment>String ends with 
 !</comment>
-        <translation type="unfinished">创建文件于
+        <translation>创建文件于
 </translation>
     </message>
     <message>
@@ -2386,7 +2398,7 @@
 </source>
         <comment>String ends with 
 !</comment>
-        <translation type="unfinished">创建目录于
+        <translation>创建目录于
 </translation>
     </message>
     <message>
@@ -2451,7 +2463,15 @@
 &lt;li&gt;Open the documentation browser of the Octave GUI with the help menu&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/body&gt;&lt;/html&gt;</source>
-        <translation type="unfinished"></translation>
+        <translation>&lt;html&gt;&lt;head&gt;
+&lt;/head&gt;&lt;body&gt;
+&lt;p&gt;更多信息关于 Octave:&lt;/p&gt;
+&lt;ul&gt;
+&lt;li&gt;访问 &lt;a href=&quot;https://octave.org&quot;&gt;https://octave.org&lt;/a&gt; (在外部浏览器中打开)&lt;/li&gt;
+&lt;li&gt;获取在线文档 &lt;a href=&quot;https://www.gnu.org/software/octave/doc/interpreter/index.html&quot;&gt;html&lt;/a&gt;- 或者 &lt;a href=&quot;https://www.gnu.org/software/octave/octave.pdf&quot;&gt;pdf&lt;/a&gt;- (在外部浏览器中打开)&lt;/li&gt;
+&lt;li&gt;使用帮助菜单打开Octave GUI的文档浏览器&lt;/li&gt;
+&lt;/ul&gt;
+&lt;/body&gt;&lt;/html&gt;</translation>
     </message>
 </context>
 <context>
@@ -2858,12 +2878,12 @@
     <message>
         <location filename="../src/main-window.cc" line="+658"/>
         <source>Save Workspace As</source>
-        <translation>工作空间另存为</translation>
+        <translation>工作区另存为</translation>
     </message>
     <message>
         <location line="+27"/>
         <source>Load Workspace</source>
-        <translation>载入工作空间</translation>
+        <translation>导入工作区</translation>
     </message>
     <message>
         <location line="+204"/>
@@ -2879,7 +2899,7 @@
     <message>
         <location line="-344"/>
         <source>Profiler</source>
-        <translation type="unfinished"></translation>
+        <translation>性能探查器</translation>
     </message>
     <message>
         <location line="+345"/>
@@ -2944,12 +2964,12 @@
     <message>
         <location line="+9"/>
         <source>Load Workspace...</source>
-        <translation>载入工作空间...</translation>
+        <translation>导入工作区...</translation>
     </message>
     <message>
         <location line="+4"/>
         <source>Save Workspace As...</source>
-        <translation>工作空间另存为...</translation>
+        <translation>工作区另存为...</translation>
     </message>
     <message>
         <location line="+6"/>
@@ -3024,7 +3044,7 @@
     <message>
         <location line="+3"/>
         <source>Clear Workspace</source>
-        <translation>清空工作空间</translation>
+        <translation>清空工作区</translation>
     </message>
     <message>
         <location line="+5"/>
@@ -3044,17 +3064,17 @@
     <message>
         <location line="+3"/>
         <source>Step</source>
-        <translation>单步</translation>
+        <translation>单步跳过</translation>
     </message>
     <message>
         <location line="+4"/>
         <source>Step In</source>
-        <translation>步入</translation>
+        <translation>单步执行</translation>
     </message>
     <message>
         <location line="+4"/>
         <source>Step Out</source>
-        <translation>步出</translation>
+        <translation>单步停止</translation>
     </message>
     <message>
         <location line="+4"/>
@@ -3064,32 +3084,32 @@
     <message>
         <location line="+9"/>
         <source>Quit Debug Mode</source>
-        <translation>退出调试</translation>
+        <translation>退出调试模式</translation>
     </message>
     <message>
         <location line="+6"/>
         <source>&amp;Tools</source>
-        <translation type="unfinished"></translation>
+        <translation>工具 (&amp;T)</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Start &amp;Profiler Session</source>
-        <translation type="unfinished"></translation>
+        <translation>启动性能分析会话 (&amp;P)</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>&amp;Resume Profiler Session</source>
-        <translation type="unfinished"></translation>
+        <translation>恢复性能分析会话 (&amp;R)</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>&amp;Stop Profiler</source>
-        <translation type="unfinished"></translation>
+        <translation>停止性能分析 (&amp;S)</translation>
     </message>
     <message>
         <location line="+4"/>
         <source>&amp;Show Profile Data</source>
-        <translation type="unfinished"></translation>
+        <translation>显示性能分析数据 (&amp;S)</translation>
     </message>
     <message>
         <location line="+50"/>
@@ -3114,7 +3134,7 @@
     <message>
         <location line="+3"/>
         <source>Show Workspace</source>
-        <translation>显示工作空间</translation>
+        <translation>显示工作区</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -3149,7 +3169,7 @@
     <message>
         <location line="+3"/>
         <source>Workspace</source>
-        <translation>工作空间</translation>
+        <translation>工作区</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -3185,7 +3205,7 @@
     <message>
         <location line="+7"/>
         <source>Report Bug</source>
-        <translation>报告问题</translation>
+        <translation>缺陷反馈</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -3439,17 +3459,17 @@
     <message>
         <location filename="../src/release-notes.cc" line="+80"/>
         <source>The release notes file &apos;%1&apos; is empty.</source>
-        <translation type="unfinished">发行注记文件 &apos;%1&apos; 是空的。</translation>
+        <translation>发行注记文件 &apos;%1&apos; 是空的。</translation>
     </message>
     <message>
         <location line="+4"/>
         <source>The release notes file &apos;%1&apos; cannot be read.</source>
-        <translation type="unfinished">发行注记文件 &apos;%1&apos; 无法读取。</translation>
+        <translation>发行注记文件 &apos;%1&apos; 无法读取。</translation>
     </message>
     <message>
         <location line="+11"/>
         <source>Octave Release Notes</source>
-        <translation type="unfinished">Octave 发行注记</translation>
+        <translation>Octave 发行注记</translation>
     </message>
 </context>
 <context>
@@ -3492,17 +3512,17 @@
     <message>
         <location line="+2"/>
         <source>Add Folder...</source>
-        <translation>添加目录...</translation>
+        <translation>添加文件夹...</translation>
     </message>
     <message>
         <location line="+4"/>
         <source>Single Folder</source>
-        <translation>单文件夹</translation>
+        <translation>单个文件夹</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Folder With Subfolders</source>
-        <translation type="unfinished"></translation>
+        <translation>有子目录的文件夹</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -3582,17 +3602,17 @@
     <message>
         <location line="-651"/>
         <source>IBeam Cursor</source>
-        <translation type="unfinished">IBeam 光标</translation>
+        <translation>IBeam 光标</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Block Cursor</source>
-        <translation type="unfinished">块状光标</translation>
+        <translation>块状光标</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Underline Cursor</source>
-        <translation type="unfinished">给光标添加下划线</translation>
+        <translation>下划线光标</translation>
     </message>
     <message>
         <location line="+168"/>
@@ -3612,17 +3632,17 @@
     <message>
         <location line="+3"/>
         <source>Hide tools tips</source>
-        <translation>隐藏工具小贴士</translation>
+        <translation>隐藏工具提示</translation>
     </message>
     <message>
         <location filename="../src/gui-preferences-cs.h" line="+76"/>
         <source>foreground</source>
-        <translation type="unfinished">前景</translation>
+        <translation>前景色</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>background</source>
-        <translation>背景</translation>
+        <translation>背景色</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -3657,81 +3677,85 @@
     <message>
         <location filename="../src/gui-preferences-ve.h" line="+74"/>
         <source>Foreground</source>
-        <translation type="unfinished">前景</translation>
+        <translation>前景色</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Background</source>
-        <translation>背景</translation>
+        <translation>背景色</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Selected Foreground</source>
-        <translation type="unfinished">所选前景</translation>
+        <translation>所选前景色</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Selected Background</source>
-        <translation type="unfinished">所选背景</translation>
+        <translation>所选背景色</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Alternate Background</source>
-        <translation type="unfinished">交替的背景</translation>
+        <translation>备选背景色</translation>
     </message>
     <message>
         <location filename="../src/gui-preferences-ws.h" line="+91"/>
         <source>argument</source>
-        <translation type="unfinished"></translation>
+        <translation>参数</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>global</source>
-        <translation type="unfinished">全局</translation>
+        <translation>全局变量</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>persistent</source>
-        <translation type="unfinished"></translation>
+        <translation>持久变量</translation>
     </message>
     <message>
         <location filename="../src/gui-preferences-global.h" line="+149"/>
         <source>Environment Variables</source>
-        <translation type="unfinished"></translation>
+        <translation>环境变量</translation>
     </message>
     <message>
         <location filename="../src/gui-settings.h" line="+132"/>
         <source>Second color mode (light/dark)</source>
-        <translation type="unfinished"></translation>
+        <translation>第二颜色模式(浅色/深色)</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Switches to another set of colors.
 Useful for defining a dark/light mode.
 Discards non-applied current changes!</source>
-        <translation type="unfinished"></translation>
+        <translation>切换到另一组颜色。
+对定义 深色/浅色 模式有用.
+丢弃当前未应用的改动!</translation>
     </message>
     <message>
         <location line="+7"/>
         <source>&amp;Reload default colors</source>
-        <translation type="unfinished"></translation>
+        <translation>重新导入默认颜色 (&amp;R)</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Reloads the default colors,
 depending on currently selected mode.</source>
-        <translation type="unfinished"></translation>
+        <translation>重新加载默认颜色,
+依赖于当前所选的模式。</translation>
     </message>
     <message>
         <location line="+4"/>
         <source>&amp;Reload default styles</source>
-        <translation type="unfinished"></translation>
+        <translation>重新导入默认样式 (&amp;R)</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Reloads the default values of the styles,
 depending on currently selected mode.</source>
-        <translation type="unfinished"></translation>
+        <translation>重新加载样式默认值,
+依赖于当前所选模式。</translation>
     </message>
 </context>
 <context>
@@ -3777,7 +3801,10 @@
 &lt;/head&gt;&lt;body&gt;
 &lt;p&gt;Allow Octave to connect to the Octave web site when it starts to display current news and information about the Octave community.&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</source>
-        <translation type="unfinished"></translation>
+        <translation>&lt;html&gt;&lt;head&gt;
+&lt;/head&gt;&lt;body&gt;
+&lt;p&gt;当 Octave 显示有关 Octave 社区的新闻和信息时,允许 Octave 连接到该网站。&lt;/p&gt;
+&lt;/body&gt;&lt;/html&gt;</translation>
     </message>
 </context>
 <context>
@@ -3833,12 +3860,12 @@
     <message>
         <location line="+1"/>
         <source>Load Workspace</source>
-        <translation>载入工作空间</translation>
+        <translation>导入工作区</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Save Workspace As</source>
-        <translation>工作空间另存为</translation>
+        <translation>工作区另存为</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -3888,7 +3915,7 @@
     <message>
         <location line="+1"/>
         <source>Clear Workspace</source>
-        <translation>清空工作空间</translation>
+        <translation>清空工作区</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -3929,17 +3956,17 @@
     <message>
         <location line="+3"/>
         <source>Start/Stop Profiler Session</source>
-        <translation type="unfinished"></translation>
+        <translation>启动/停止性能分析会话</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Resume Profiler Session</source>
-        <translation type="unfinished"></translation>
+        <translation>恢复性能分析会话</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Show Profile Data</source>
-        <translation type="unfinished"></translation>
+        <translation>显示性能分析数据</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -3959,7 +3986,7 @@
     <message>
         <location line="+1"/>
         <source>Show Workspace</source>
-        <translation>显示工作空间</translation>
+        <translation>显示工作区</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -3994,7 +4021,7 @@
     <message>
         <location line="+1"/>
         <source>Workspace</source>
-        <translation>工作空间</translation>
+        <translation>工作区</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -4337,12 +4364,12 @@
     <message>
         <location line="+21"/>
         <source>Bookmark this Page</source>
-        <translation type="unfinished"></translation>
+        <translation>为此标签页添加标签</translation>
     </message>
     <message>
         <location line="+91"/>
         <source>Tools Menu</source>
-        <translation type="unfinished"></translation>
+        <translation>工具菜单</translation>
     </message>
     <message>
         <location line="+8"/>
@@ -4382,7 +4409,7 @@
     <message>
         <location line="-24"/>
         <source>Show On-disk Documentation</source>
-        <translation type="unfinished"></translation>
+        <translation>显示磁盘中的文档</translation>
     </message>
     <message>
         <location line="+25"/>
@@ -4643,12 +4670,12 @@
         <location line="+5"/>
         <location line="+6"/>
         <source>Save in format ...</source>
-        <translation type="unfinished"></translation>
+        <translation>保存为格式...</translation>
     </message>
     <message>
         <location line="-5"/>
         <source>Save variable to a file in different format</source>
-        <translation type="unfinished"></translation>
+        <translation>以不同的格式保存变量到文件</translation>
     </message>
     <message>
         <location line="+20"/>
@@ -4792,7 +4819,7 @@
     <message>
         <location line="+1"/>
         <source>Class</source>
-        <translation>类</translation>
+        <translation>类型</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -4826,7 +4853,7 @@
     <message>
         <location filename="../src/workspace-view.cc" line="+59"/>
         <source>Workspace</source>
-        <translation>工作空间</translation>
+        <translation>工作区</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -4952,7 +4979,7 @@
     <message>
         <location line="-630"/>
         <source>Text inactive</source>
-        <translation>不活动的文本</translation>
+        <translation>不活动的文本颜色</translation>
     </message>
     <message>
         <location line="-32"/>
@@ -4978,7 +5005,7 @@
     <message>
         <location line="+13"/>
         <source>Background inactive</source>
-        <translation>不活动的背景</translation>
+        <translation>不活动的背景颜色</translation>
     </message>
     <message>
         <location line="+19"/>
@@ -5095,7 +5122,7 @@
     <message>
         <location line="+23"/>
         <source>Replace word by suggested one</source>
-        <translation>使用建议的单词替换原有的</translation>
+        <translation>使用建议的单词替换原单词</translation>
     </message>
     <message>
         <location line="-10"/>
@@ -5306,7 +5333,7 @@
     <message>
         <location line="+29"/>
         <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Rotate tabs: Vertical when at top or bottom and horizontal when left or right. The close button is not shown in rotated tabs.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
-        <translation type="unfinished"></translation>
+        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;旋转标签页:在顶部或底部时为垂直,在左侧或右侧时为水平。 关闭按钮在旋转后的标签页中不显示。&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
     </message>
     <message>
         <location line="+74"/>
@@ -5396,7 +5423,7 @@
     <message>
         <location line="+47"/>
         <source>Restore editor tabs from previous session on startup or when editor is shown again after closing</source>
-        <translation>在启动时或者当编辑器关闭后再次显示时,恢复上次会话的编辑器标签页</translation>
+        <translation>在启动时或编辑器关闭后再次显示时,恢复上次会话的编辑器标签页</translation>
     </message>
     <message>
         <location line="+105"/>
@@ -5411,12 +5438,12 @@
     <message>
         <location line="-133"/>
         <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;If set, the focus of the widgets that are docked to the main window follows the mouse cursor. This is intended for having the same behavior within the main window when &amp;quot;focus follows mouse&amp;quot; is used for the desktop environment.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
-        <translation type="unfinished"></translation>
+        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;如果选中,则停靠到主窗口组件的焦点跟随鼠标光标。 这是为了在&amp;quot;焦点跟随鼠标&amp;quot;时在主窗口中具有相同的行为。 用于桌面环境。&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Focus follows mouse for widgets docked to the main window</source>
-        <translation type="unfinished"></translation>
+        <translation>组件停靠到主窗口时焦点跟随鼠标</translation>
     </message>
     <message>
         <location line="+182"/>
@@ -5427,32 +5454,32 @@
     <message>
         <location line="-1223"/>
         <source>Rotated tabs</source>
-        <translation type="unfinished"></translation>
+        <translation>旋转标签页</translation>
     </message>
     <message>
         <location line="+25"/>
         <source>Position</source>
-        <translation type="unfinished">位置</translation>
+        <translation>位置</translation>
     </message>
     <message>
         <location line="+9"/>
         <source>Max. tab width in chars (0: no limit)</source>
-        <translation type="unfinished"></translation>
+        <translation>以字符为单位的最大标签页宽度(0:无限制)</translation>
     </message>
     <message>
         <location line="+7"/>
         <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Max. width of a tab in characters (average char. width). Especially useful for rotated tabs.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
-        <translation type="unfinished"></translation>
+        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;以字符为单位的最大制表符宽度(平均字符宽度)。 特别是对旋转标签页有用。&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
     </message>
     <message>
         <location line="+851"/>
         <source>Force newline at end when saving file</source>
-        <translation type="unfinished"></translation>
+        <translation>保存文件时强制在文件结尾换行</translation>
     </message>
     <message>
         <location line="+10"/>
         <source>Remove trailing spaces when saving file</source>
-        <translation type="unfinished"></translation>
+        <translation>保存文件时删除末尾空格</translation>
     </message>
     <message>
         <location line="+76"/>
@@ -5467,7 +5494,7 @@
     <message>
         <location line="+75"/>
         <source>Workspace</source>
-        <translation>工作空间</translation>
+        <translation>工作区</translation>
     </message>
     <message>
         <location line="+35"/>
@@ -5482,7 +5509,7 @@
     <message>
         <location line="+117"/>
         <source>Disable menu accelerators of main window menus when Commmand Window has focus</source>
-        <translation type="unfinished"></translation>
+        <translation>当命令窗口获取焦点时禁用主窗口菜单的菜单快捷键</translation>
     </message>
     <message>
         <location line="+37"/>
@@ -5528,12 +5555,12 @@
     <message>
         <location line="+10"/>
         <source>Proxy Server</source>
-        <translation type="unfinished"></translation>
+        <translation>代理服务器</translation>
     </message>
     <message>
         <location line="+23"/>
         <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select &lt;span style=&quot; font-style:italic;&quot;&gt;HttpProxy&lt;/span&gt;, &lt;span style=&quot; font-style:italic;&quot;&gt;Sock5Proxy&lt;/span&gt; or &lt;span style=&quot; font-style:italic;&quot;&gt;Environment Variables&lt;/span&gt;. With the last selection, the proxy is taken from the first non-empty environment variable ALL_PROXY, HTTP_PROXY or HTTPS_PROXY .&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
-        <translation type="unfinished"></translation>
+        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;选择 &lt;span style=&quot; font-style:italic;&quot;&gt;HttpProxy&lt;/span&gt;, &lt;span style=&quot; font-style:italic;&quot;&gt;Sock5Proxy&lt;/span&gt; 或者 &lt;span style=&quot; font-style:italic;&quot;&gt;Environment Variables&lt;/span&gt;。 选中最后一个选项时,代理取自第一个非空的环境变量 ALL_PROXY, HTTP_PROXY 或 HTTPS_PROXY 。&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
     </message>
     <message>
         <location line="+78"/>
@@ -5611,13 +5638,17 @@
 interference with readline key strokes.
 Exceptions: Ctrl-C for interrupting the interpreter
 and the shortcuts for switching to other widgets.</source>
-        <translation type="unfinished"></translation>
+        <translation>禁用全局快捷键以防止
+干扰 readline 快捷键。
+异常: Ctrl-C 用于中断解释器
+和切换到其他组件的快捷键。</translation>
     </message>
     <message>
         <location line="+16"/>
         <source>Disable menu accelerators in order to prevent
 interference with readline key strokes.</source>
-        <translation type="unfinished"></translation>
+        <translation>禁用菜单快捷键以防止
+干扰 readline 快捷键。</translation>
     </message>
     <message>
         <location line="+54"/>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libinterp/corefcn/auto-shlib.cc	Thu Feb 17 22:42:22 2022 -0500
@@ -0,0 +1,41 @@
+////////////////////////////////////////////////////////////////////////
+//
+// Copyright (C) 2022 The Octave Project Developers
+//
+// See the file COPYRIGHT.md in the top-level directory of this
+// distribution or <https://octave.org/copyright/>.
+//
+// This file is part of Octave.
+//
+// Octave is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Octave is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Octave; see the file COPYING.  If not, see
+// <https://www.gnu.org/licenses/>.
+//
+////////////////////////////////////////////////////////////////////////
+
+#if defined (HAVE_CONFIG_H)
+#  include "config.h"
+#endif
+
+#include "octave-config.h"
+
+#include "auto-shlib.h"
+#include "defun-int.h"
+
+OCTAVE_NAMESPACE_BEGIN
+
+auto_shlib::auto_shlib (void)
+  : dynamic_library (get_current_shlib ())
+{ }
+
+OCTAVE_NAMESPACE_END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libinterp/corefcn/auto-shlib.h	Thu Feb 17 22:42:22 2022 -0500
@@ -0,0 +1,57 @@
+////////////////////////////////////////////////////////////////////////
+//
+// Copyright (C) 2022 The Octave Project Developers
+//
+// See the file COPYRIGHT.md in the top-level directory of this
+// distribution or <https://octave.org/copyright/>.
+//
+// This file is part of Octave.
+//
+// Octave is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Octave is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Octave; see the file COPYING.  If not, see
+// <https://www.gnu.org/licenses/>.
+//
+////////////////////////////////////////////////////////////////////////
+
+#if ! defined (octave_auto_shlib_h)
+#define octave_auto_shlib_h 1
+
+#include "octave-config.h"
+
+#include "oct-shlib.h"
+
+OCTAVE_NAMESPACE_BEGIN
+
+// This is a convenience class that calls the
+// octave::get_dynamic_library function automatically at construction
+// time.  When deriving new classes, you can either use it as a field or
+// as a parent (with multiple inheritance).
+
+class
+OCTINTERP_API
+auto_shlib : public dynamic_library
+{
+public:
+
+  auto_shlib (void);
+
+  ~auto_shlib (void) = default;
+
+  auto_shlib (const auto_shlib&) = default;
+
+  auto_shlib& operator = (const auto_shlib&) = default;
+};
+
+OCTAVE_NAMESPACE_END
+
+#endif
--- a/libinterp/corefcn/defun-int.h	Tue Feb 15 18:57:16 2022 +0100
+++ b/libinterp/corefcn/defun-int.h	Thu Feb 17 22:42:22 2022 -0500
@@ -64,22 +64,6 @@
 // Gets the shlib of the currently executing DLD function, if any.
 extern OCTINTERP_API dynamic_library get_current_shlib (void);
 
-// FIXME: this class doesn't seem to be used in Octave.  Is it
-// really needed?
-
-// This is a convenience class that calls the above function automatically at
-// construction time.  When deriving new classes, you can either use it as a
-// field or as a parent (with multiple inheritance).
-
-class auto_shlib : public dynamic_library
-{
-public:
-
-  auto_shlib (void) : dynamic_library (get_current_shlib ()) { }
-
-  auto_shlib (const dynamic_library& shl) : dynamic_library (shl) { }
-};
-
 OCTAVE_NAMESPACE_END
 
 // Some of these functions are widely used, so maybe we should avoid
--- a/libinterp/corefcn/interpreter.cc	Tue Feb 15 18:57:16 2022 +0100
+++ b/libinterp/corefcn/interpreter.cc	Thu Feb 17 22:42:22 2022 -0500
@@ -990,7 +990,7 @@
     // and functions to be cleared.
 
     OCTAVE_SAFE_CALL (clear_all, ());
-    OCTAVE_SAFE_CALL (m_event_manager.set_workspace, ());
+    OCTAVE_SAFE_CALL (m_event_manager.clear_workspace, ());
 
     // If we are attached to a GUI, queue and event to close it (only
     // works with the new terminal widget), process pending events and
@@ -1334,6 +1334,8 @@
 
   int interpreter::main_loop (void)
   {
+    command_editor::add_event_hook (release_unreferenced_dynamic_libraries);
+
     return m_evaluator.repl ();
   }
 
--- a/libinterp/corefcn/module.mk	Tue Feb 15 18:57:16 2022 +0100
+++ b/libinterp/corefcn/module.mk	Thu Feb 17 22:42:22 2022 -0500
@@ -17,6 +17,7 @@
 DIRSTAMP_FILES += %reldir%/$(octave_dirstamp)
 
 COREFCN_INC = \
+  %reldir%/auto-shlib.h \
   %reldir%/base-text-renderer.h \
   %reldir%/Cell.h \
   %reldir%/c-file-ptr-stream.h \
@@ -125,6 +126,7 @@
   %reldir%/__pchip_deriv__.cc \
   %reldir%/__qp__.cc \
   %reldir%/amd.cc \
+  %reldir%/auto-shlib.cc \
   %reldir%/balance.cc \
   %reldir%/base-text-renderer.cc \
   %reldir%/besselj.cc \
--- a/libinterp/dldfcn/audiodevinfo.cc	Tue Feb 15 18:57:16 2022 +0100
+++ b/libinterp/dldfcn/audiodevinfo.cc	Thu Feb 17 22:42:22 2022 -0500
@@ -44,7 +44,6 @@
 #include "defun-dld.h"
 #include "error.h"
 #include "errwarn.h"
-#include "interpreter.h"
 #include "oct-map.h"
 #include "ov-int32.h"
 #include "ov.h"
@@ -519,7 +518,7 @@
 
 enum audio_type { TYPE_INT8, TYPE_UINT8, TYPE_UINT16, TYPE_DOUBLE };
 
-class audioplayer : public octave_base_value
+class audioplayer : public octave_base_dld_value
 {
 public:
   audioplayer (void);
@@ -1269,7 +1268,7 @@
   return (err == 1);
 }
 
-class audiorecorder : public octave_base_value
+class audiorecorder : public octave_base_dld_value
 {
 public:
   audiorecorder (void);
@@ -1913,8 +1912,8 @@
 
 #endif
 
-DEFMETHOD_DLD (__recorder_audiorecorder__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__recorder_audiorecorder__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn  {} {@var{recorder} =} __recorder_audiorecorder__ (@var{fs}, @var{nbits}, @var{channels})
 @deftypefnx {} {@var{recorder} =} __recorder_audiorecorder__ (@var{fs}, @var{nbits}, @var{channels}, @var{id})
 @deftypefnx {} {@var{recorder} =} __recorder_audiorecorder__ (@var{fcn}, @dots{})
@@ -1925,8 +1924,6 @@
 
 #if defined (HAVE_PORTAUDIO)
 
-  interp.mlock ();
-
   int nargin = args.length ();
 
   audiorecorder *recorder = new audiorecorder ();
@@ -1956,7 +1953,6 @@
   retval = recorder;
 
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__recorder_audiorecorder__",
@@ -1969,10 +1965,8 @@
 #if defined (HAVE_PORTAUDIO)
 
 static audiorecorder *
-get_recorder (interpreter& interp, const octave_value& ov)
+get_recorder (const octave_value& ov)
 {
-  interp.mlock ();
-
   const octave_base_value& rep = ov.get_rep ();
 
   octave_base_value *ncrep = const_cast<octave_base_value *> (&rep);
@@ -1986,8 +1980,8 @@
 
 #endif
 
-DEFMETHOD_DLD (__recorder_getaudiodata__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__recorder_getaudiodata__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn {} {@var{data} =} __recorder_getaudiodata__ (@var{recorder})
 Undocumented internal function.
 @end deftypefn */)
@@ -1995,9 +1989,8 @@
   octave_value retval;
 
 #if defined (HAVE_PORTAUDIO)
-  retval = get_recorder (interp, args(0))->getaudiodata ();
+  retval = get_recorder (args(0))->getaudiodata ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__recorder_getaudiodata__",
@@ -2007,8 +2000,8 @@
   return retval;
 }
 
-DEFMETHOD_DLD (__recorder_get_channels__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__recorder_get_channels__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn {} {@var{n} =} __recorder_get_channels__ (@var{recorder})
 Undocumented internal function.
 @end deftypefn */)
@@ -2016,9 +2009,8 @@
   octave_value retval;
 
 #if defined (HAVE_PORTAUDIO)
-  retval = get_recorder (interp, args(0))->get_channels ();
+  retval = get_recorder (args(0))->get_channels ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__recorder_get_channels__",
@@ -2028,8 +2020,8 @@
   return retval;
 }
 
-DEFMETHOD_DLD (__recorder_get_fs__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__recorder_get_fs__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn {} {@var{fs} =} __recorder_get_fs__ (@var{recorder})
 Undocumented internal function.
 @end deftypefn */)
@@ -2037,9 +2029,8 @@
   octave_value retval;
 
 #if defined (HAVE_PORTAUDIO)
-  retval = get_recorder (interp, args(0))->get_fs ();
+  retval = get_recorder (args(0))->get_fs ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__recorder_get_fs__",
@@ -2049,8 +2040,8 @@
   return retval;
 }
 
-DEFMETHOD_DLD (__recorder_get_id__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__recorder_get_id__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn {} {@var{id} =} __recorder_get_id__ (@var{recorder})
 Undocumented internal function.
 @end deftypefn */)
@@ -2058,9 +2049,8 @@
   octave_value retval;
 
 #if defined (HAVE_PORTAUDIO)
-  retval = get_recorder (interp, args(0))->get_id ();
+  retval = get_recorder (args(0))->get_id ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__recorder_get_id__",
@@ -2070,8 +2060,8 @@
   return retval;
 }
 
-DEFMETHOD_DLD (__recorder_get_nbits__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__recorder_get_nbits__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn {} {@var{nbits} =} __recorder_get_nbits__ (@var{recorder})
 Undocumented internal function.
 @end deftypefn */)
@@ -2079,9 +2069,8 @@
   octave_value retval;
 
 #if defined (HAVE_PORTAUDIO)
-  retval = get_recorder (interp, args(0))->get_nbits ();
+  retval = get_recorder (args(0))->get_nbits ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__recorder_get_nbits__",
@@ -2091,8 +2080,8 @@
   return retval;
 }
 
-DEFMETHOD_DLD (__recorder_get_sample_number__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__recorder_get_sample_number__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn {} {@var{n} =} __recorder_get_sample_number__ (@var{recorder})
 Undocumented internal function.
 @end deftypefn */)
@@ -2100,9 +2089,8 @@
   octave_value retval;
 
 #if defined (HAVE_PORTAUDIO)
-  retval = get_recorder (interp, args(0))->get_sample_number ();
+  retval = get_recorder (args(0))->get_sample_number ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__recorder_get_sample_number__",
@@ -2112,8 +2100,8 @@
   return retval;
 }
 
-DEFMETHOD_DLD (__recorder_get_tag__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__recorder_get_tag__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn {} {@var{tag} =} __recorder_get_tag__ (@var{recorder})
 Undocumented internal function.
 @end deftypefn */)
@@ -2121,9 +2109,8 @@
   octave_value retval;
 
 #if defined (HAVE_PORTAUDIO)
-  retval = get_recorder (interp, args(0))->get_tag ();
+  retval = get_recorder (args(0))->get_tag ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__recorder_get_tag__",
@@ -2133,8 +2120,8 @@
   return retval;
 }
 
-DEFMETHOD_DLD (__recorder_get_total_samples__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__recorder_get_total_samples__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn {} {@var{n} =} __recorder_get_total_samples__ (@var{recorder})
 Undocumented internal function.
 @end deftypefn */)
@@ -2142,9 +2129,8 @@
   octave_value retval;
 
 #if defined (HAVE_PORTAUDIO)
-  retval = get_recorder (interp, args(0))->get_total_samples ();
+  retval = get_recorder (args(0))->get_total_samples ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__recorder_get_total_samples__",
@@ -2154,8 +2140,8 @@
   return retval;
 }
 
-DEFMETHOD_DLD (__recorder_get_userdata__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__recorder_get_userdata__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn {} {@var{data} =} __recorder_get_userdata__ (@var{recorder})
 Undocumented internal function.
 @end deftypefn */)
@@ -2163,9 +2149,8 @@
   octave_value retval;
 
 #if defined (HAVE_PORTAUDIO)
-  retval = get_recorder (interp, args(0))->get_userdata ();
+  retval = get_recorder (args(0))->get_userdata ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__recorder_get_userdata__",
@@ -2175,8 +2160,8 @@
   return retval;
 }
 
-DEFMETHOD_DLD (__recorder_isrecording__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__recorder_isrecording__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn {} {} __recorder_isrecording__ (@var{recorder})
 Undocumented internal function.
 @end deftypefn */)
@@ -2184,9 +2169,8 @@
   octave_value retval;
 
 #if defined (HAVE_PORTAUDIO)
-  retval = get_recorder (interp, args(0))->isrecording ();
+  retval = get_recorder (args(0))->isrecording ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__recorder_isrecording__",
@@ -2196,17 +2180,16 @@
   return retval;
 }
 
-DEFMETHOD_DLD (__recorder_pause__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__recorder_pause__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn {} {} __recorder_pause__ (@var{recorder})
 Undocumented internal function.
 @end deftypefn */)
 {
 #if defined (HAVE_PORTAUDIO)
-  get_recorder (interp, args(0))->pause ();
+  get_recorder (args(0))->pause ();
   return ovl ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__recorder_pause__",
@@ -2214,18 +2197,17 @@
 #endif
 }
 
-DEFMETHOD_DLD (__recorder_recordblocking__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__recorder_recordblocking__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn {} {} __recorder_recordblocking__ (@var{recorder}, @var{seconds})
 Undocumented internal function.
 @end deftypefn */)
 {
 #if defined (HAVE_PORTAUDIO)
   float seconds = args(1).float_value ();
-  get_recorder (interp, args(0))->recordblocking (seconds);
+  get_recorder (args(0))->recordblocking (seconds);
   return ovl ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__recorder_recordblocking__",
@@ -2233,15 +2215,15 @@
 #endif
 }
 
-DEFMETHOD_DLD (__recorder_record__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__recorder_record__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn  {} {} __recorder_record__ (@var{recorder})
 @deftypefnx {} {} __recorder_record__ (@var{recorder}, @var{seconds})
 Undocumented internal function.
 @end deftypefn */)
 {
 #if defined (HAVE_PORTAUDIO)
-  audiorecorder *recorder = get_recorder (interp, args(0));
+  audiorecorder *recorder = get_recorder (args(0));
 
   if (args.length () == 2)
     recorder->set_end_sample (args(1).int_value () * recorder->get_fs ());
@@ -2249,7 +2231,6 @@
   recorder->record ();
   return ovl ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__recorder_record__",
@@ -2257,18 +2238,17 @@
 #endif
 }
 
-DEFMETHOD_DLD (__recorder_resume__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__recorder_resume__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn {} {} __recorder_resume__ (@var{recorder})
 Undocumented internal function.
 @end deftypefn */)
 {
 #if defined (HAVE_PORTAUDIO)
   if (args.length () == 1)
-    get_recorder (interp, args(0))->resume ();
+    get_recorder (args(0))->resume ();
   return ovl ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__recorder_resume__",
@@ -2276,18 +2256,17 @@
 #endif
 }
 
-DEFMETHOD_DLD (__recorder_set_fs__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__recorder_set_fs__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn {} {} __recorder_set_fs__ (@var{recorder}, @var{fs})
 Undocumented internal function.
 @end deftypefn */)
 {
 #if defined (HAVE_PORTAUDIO)
   if (args.length () == 2)
-    get_recorder (interp, args(0))->set_fs (args(1).int_value ());
+    get_recorder (args(0))->set_fs (args(1).int_value ());
   return ovl ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__recorder_set_fs__",
@@ -2295,18 +2274,17 @@
 #endif
 }
 
-DEFMETHOD_DLD (__recorder_set_tag__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__recorder_set_tag__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn {} {} __recorder_set_tag__ (@var{recorder}, @var{tag})
 Undocumented internal function.
 @end deftypefn */)
 {
 #if defined (HAVE_PORTAUDIO)
   if (args.length () == 2)
-    get_recorder (interp, args(0))->set_tag (args(1).char_matrix_value ());
+    get_recorder (args(0))->set_tag (args(1).char_matrix_value ());
   return ovl ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__recorder_set_tag__",
@@ -2314,18 +2292,17 @@
 #endif
 }
 
-DEFMETHOD_DLD (__recorder_set_userdata__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__recorder_set_userdata__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn {} {} __recorder_set_userdata__ (@var{recorder}, @var{data})
 Undocumented internal function.
 @end deftypefn */)
 {
 #if defined (HAVE_PORTAUDIO)
   if (args.length () == 2)
-    get_recorder (interp, args(0))->set_userdata (args(1));
+    get_recorder (args(0))->set_userdata (args(1));
   return ovl ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__recorder_set_userdata__",
@@ -2333,18 +2310,17 @@
 #endif
 }
 
-DEFMETHOD_DLD (__recorder_stop__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__recorder_stop__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn {} {} __recorder_stop__ (@var{recorder})
 Undocumented internal function.
 @end deftypefn */)
 {
 #if defined (HAVE_PORTAUDIO)
   if (args.length () == 1)
-    get_recorder (interp, args(0))->stop ();
+    get_recorder (args(0))->stop ();
   return ovl ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__recorder_stop__",
@@ -2352,8 +2328,8 @@
 #endif
 }
 
-DEFMETHOD_DLD (__player_audioplayer__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__player_audioplayer__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn  {} {@var{player} =} __player_audioplayer__ (@var{y}, @var{fs})
 @deftypefnx {} {@var{player} =} __player_audioplayer__ (@var{y}, @var{fs}, @var{nbits})
 @deftypefnx {} {@var{player} =} __player_audioplayer__ (@var{y}, @var{fs}, @var{nbits}, @var{id})
@@ -2363,7 +2339,6 @@
   octave_value retval;
 
 #if defined (HAVE_PORTAUDIO)
-  interp.mlock ();
 
   audioplayer *recorder = new audioplayer ();
 
@@ -2403,7 +2378,6 @@
 
   retval = recorder;
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__player_audioplayer__",
@@ -2416,10 +2390,8 @@
 #if defined (HAVE_PORTAUDIO)
 
 static audioplayer *
-get_player (interpreter& interp, const octave_value& ov)
+get_player (const octave_value& ov)
 {
-  interp.mlock ();
-
   const octave_base_value& rep = ov.get_rep ();
 
   octave_base_value *ncrep = const_cast<octave_base_value *> (&rep);
@@ -2433,8 +2405,8 @@
 
 #endif
 
-DEFMETHOD_DLD (__player_get_channels__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__player_get_channels__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn {} {@var{n} =} __player_get_channels__ (@var{player})
 Undocumented internal function.
 @end deftypefn */)
@@ -2443,9 +2415,8 @@
 
 #if defined (HAVE_PORTAUDIO)
   if (args.length () == 1)
-    retval = get_player (interp, args(0))->get_channels ();
+    retval = get_player (args(0))->get_channels ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__player_get_channels__",
@@ -2455,8 +2426,8 @@
   return retval;
 }
 
-DEFMETHOD_DLD (__player_get_fs__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__player_get_fs__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn {} {@var{fs} =} __player_get_fs__ (@var{player})
 Undocumented internal function.
 @end deftypefn */)
@@ -2465,9 +2436,8 @@
 
 #if defined (HAVE_PORTAUDIO)
   if (args.length () == 1)
-    retval = get_player (interp, args(0))->get_fs ();
+    retval = get_player (args(0))->get_fs ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__player_get_fs__",
@@ -2477,8 +2447,8 @@
   return retval;
 }
 
-DEFMETHOD_DLD (__player_get_id__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__player_get_id__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn {} {@var{id} =} __player_get_id__ (@var{player})
 Undocumented internal function.
 @end deftypefn */)
@@ -2487,9 +2457,8 @@
 
 #if defined (HAVE_PORTAUDIO)
   if (args.length () == 1)
-    retval = get_player (interp, args(0))->get_id ();
+    retval = get_player (args(0))->get_id ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__player_get_id__",
@@ -2499,8 +2468,8 @@
   return retval;
 }
 
-DEFMETHOD_DLD (__player_get_nbits__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__player_get_nbits__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn {} {@var{nbits} =} __player_get_nbits__ (@var{player})
 Undocumented internal function.
 @end deftypefn */)
@@ -2509,9 +2478,8 @@
 
 #if defined (HAVE_PORTAUDIO)
   if (args.length () == 1)
-    retval = get_player (interp, args(0))->get_nbits ();
+    retval = get_player (args(0))->get_nbits ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__player_get_nbits__",
@@ -2521,8 +2489,8 @@
   return retval;
 }
 
-DEFMETHOD_DLD (__player_get_sample_number__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__player_get_sample_number__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn {} {@var{n} =} __player_get_sample_number__ (@var{player})
 Undocumented internal function.
 @end deftypefn */)
@@ -2531,9 +2499,8 @@
 
 #if defined (HAVE_PORTAUDIO)
   if (args.length () == 1)
-    retval = get_player (interp, args(0))->get_sample_number ();
+    retval = get_player (args(0))->get_sample_number ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__player_get_sample_number__",
@@ -2543,8 +2510,8 @@
   return retval;
 }
 
-DEFMETHOD_DLD (__player_get_tag__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__player_get_tag__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn {} {@var{tag} =} __player_get_tag__ (@var{player})
 Undocumented internal function.
 @end deftypefn */)
@@ -2553,9 +2520,8 @@
 
 #if defined (HAVE_PORTAUDIO)
   if (args.length () == 1)
-    retval = get_player (interp, args(0))->get_tag ();
+    retval = get_player (args(0))->get_tag ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__player_get_tag__",
@@ -2565,8 +2531,8 @@
   return retval;
 }
 
-DEFMETHOD_DLD (__player_get_total_samples__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__player_get_total_samples__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn {} {@var{n} =} __player_get_total_samples__ (@var{player})
 Undocumented internal function.
 @end deftypefn */)
@@ -2575,9 +2541,8 @@
 
 #if defined (HAVE_PORTAUDIO)
   if (args.length () == 1)
-    retval = get_player (interp, args(0))->get_total_samples ();
+    retval = get_player (args(0))->get_total_samples ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__player_get_total_samples__",
@@ -2587,8 +2552,8 @@
   return retval;
 }
 
-DEFMETHOD_DLD (__player_get_userdata__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__player_get_userdata__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn {} {@var{data} =} __player_get_userdata__ (@var{player})
 Undocumented internal function.
 @end deftypefn */)
@@ -2597,9 +2562,8 @@
 
 #if defined (HAVE_PORTAUDIO)
   if (args.length () == 1)
-    retval = get_player (interp, args(0))->get_userdata ();
+    retval = get_player (args(0))->get_userdata ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__player_get_userdata__",
@@ -2609,8 +2573,8 @@
   return retval;
 }
 
-DEFMETHOD_DLD (__player_isplaying__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__player_isplaying__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn {} {} __player_isplaying__ (@var{player})
 Undocumented internal function.
 @end deftypefn */)
@@ -2619,9 +2583,8 @@
 
 #if defined (HAVE_PORTAUDIO)
   if (args.length () == 1)
-    retval = get_player (interp, args(0))->isplaying ();
+    retval = get_player (args(0))->isplaying ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__player_isplaying__",
@@ -2631,18 +2594,17 @@
   return retval;
 }
 
-DEFMETHOD_DLD (__player_pause__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__player_pause__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn {} {} __player_pause__ (@var{player})
 Undocumented internal function.
 @end deftypefn */)
 {
 #if defined (HAVE_PORTAUDIO)
   if (args.length () == 1)
-    get_player (interp, args(0))->pause ();
+    get_player (args(0))->pause ();
   return ovl ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__player_pause__",
@@ -2650,8 +2612,8 @@
 #endif
 }
 
-DEFMETHOD_DLD (__player_playblocking__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__player_playblocking__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn  {} {} __player_playblocking__ (@var{player})
 @deftypefnx {} {} __player_playblocking__ (@var{player}, @var{start})
 @deftypefnx {} {} __player_playblocking__ (@var{player}, [@var{start}, @var{end}])
@@ -2660,7 +2622,7 @@
 {
 #if defined (HAVE_PORTAUDIO)
 
-  audioplayer *player = get_player (interp, args(0));
+  audioplayer *player = get_player (args(0));
 
   if (args.length () == 1)
     {
@@ -2697,7 +2659,6 @@
 
   return ovl ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__player_playblocking__",
@@ -2705,8 +2666,8 @@
 #endif
 }
 
-DEFMETHOD_DLD (__player_play__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__player_play__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn  {} {} __player_play__ (@var{player})
 @deftypefnx {} {} __player_play__ (@var{player}, @var{start})
 @deftypefnx {} {} __player_play__ (@var{player}, [@var{start}, @var{end}])
@@ -2717,11 +2678,11 @@
 
   if (args.length () == 1)
     {
-      get_player (interp, args(0))->play ();
+      get_player (args(0))->play ();
     }
   else if (args.length () == 2)
     {
-      audioplayer *player = get_player (interp, args(0));
+      audioplayer *player = get_player (args(0));
 
       if (args(1).is_matrix_type ())
         {
@@ -2752,7 +2713,6 @@
 
   return ovl ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__player_play__",
@@ -2760,18 +2720,17 @@
 #endif
 }
 
-DEFMETHOD_DLD (__player_resume__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__player_resume__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn {} {} __player_resume__ (@var{player})
 Undocumented internal function.
 @end deftypefn */)
 {
 #if defined (HAVE_PORTAUDIO)
   if (args.length () == 1)
-    get_player (interp, args(0))->resume ();
+    get_player (args(0))->resume ();
   return ovl ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__player_resume__",
@@ -2779,18 +2738,17 @@
 #endif
 }
 
-DEFMETHOD_DLD (__player_set_fs__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__player_set_fs__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn {} {} __player_set_fs__ (@var{player}, @var{fs})
 Undocumented internal function.
 @end deftypefn */)
 {
 #if defined (HAVE_PORTAUDIO)
   if (args.length () == 2)
-    get_player (interp, args(0))->set_fs (args(1).int_value ());
+    get_player (args(0))->set_fs (args(1).int_value ());
   return ovl ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__player_set_fs__",
@@ -2798,18 +2756,17 @@
 #endif
 }
 
-DEFMETHOD_DLD (__player_set_tag__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__player_set_tag__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn {} {} __player_set_tag__ (@var{player}, @var{tag})
 Undocumented internal function.
 @end deftypefn */)
 {
 #if defined (HAVE_PORTAUDIO)
   if (args.length () == 2)
-    get_player (interp, args(0))->set_tag (args(1).char_matrix_value ());
+    get_player (args(0))->set_tag (args(1).char_matrix_value ());
   return ovl ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__player_set_tag__",
@@ -2817,18 +2774,17 @@
 #endif
 }
 
-DEFMETHOD_DLD (__player_set_userdata__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__player_set_userdata__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn {} {} __player_set_userdata__ (@var{player}, @var{data})
 Undocumented internal function.
 @end deftypefn */)
 {
 #if defined (HAVE_PORTAUDIO)
   if (args.length () == 2)
-    get_player (interp, args(0))->set_userdata (args(1));
+    get_player (args(0))->set_userdata (args(1));
   return ovl ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__player_set_userdata__",
@@ -2836,18 +2792,17 @@
 #endif
 }
 
-DEFMETHOD_DLD (__player_stop__, interp, args, ,
-               doc: /* -*- texinfo -*-
+DEFUN_DLD (__player_stop__, args, ,
+           doc: /* -*- texinfo -*-
 @deftypefn {} {} __player_stop__ (@var{player})
 Undocumented internal function.
 @end deftypefn */)
 {
 #if defined (HAVE_PORTAUDIO)
   if (args.length () == 1)
-    get_player (interp, args(0))->stop ();
+    get_player (args(0))->stop ();
   return ovl ();
 #else
-  octave_unused_parameter (interp);
   octave_unused_parameter (args);
 
   err_disabled_feature ("__player_stop__",
--- a/libinterp/octave-value/ov-base.h	Tue Feb 15 18:57:16 2022 +0100
+++ b/libinterp/octave-value/ov-base.h	Thu Feb 17 22:42:22 2022 -0500
@@ -40,6 +40,7 @@
 #include "mx-base.h"
 #include "str-vec.h"
 
+#include "auto-shlib.h"
 #include "oct-hdf5-types.h"
 #include "oct-stream.h"
 
@@ -914,6 +915,28 @@
   DECLARE_OV_BASE_TYPEID_FUNCTIONS_AND_DATA
 };
 
+class
+OCTINTERP_API
+octave_base_dld_value : public octave_base_value
+{
+public:
+
+  octave_base_dld_value (void) = default;
+
+  ~octave_base_dld_value (void)
+  {
+    m_containing_dynamic_library.delete_later ();
+  }
+
+  octave_base_dld_value (const octave_base_dld_value&) = default;
+
+  octave_base_dld_value& operator = (const octave_base_dld_value&) = default;
+
+private:
+
+  octave::auto_shlib m_containing_dynamic_library;
+};
+
 // TRUE means to perform automatic sparse to real mutation if there
 // is memory to be saved
 extern OCTINTERP_API bool Vsparse_auto_mutate;
--- a/libinterp/parse-tree/pt-eval.cc	Tue Feb 15 18:57:16 2022 +0100
+++ b/libinterp/parse-tree/pt-eval.cc	Thu Feb 17 22:42:22 2022 -0500
@@ -188,6 +188,8 @@
 
             command_editor::run_event_hooks ();
 
+            release_unreferenced_dynamic_libraries ();
+
             sleep (0.1);
           }
         catch (const interrupt_exception&)
@@ -898,6 +900,8 @@
 
             command_editor::run_event_hooks ();
 
+            release_unreferenced_dynamic_libraries ();
+
             sleep (0.1);
           }
         catch (const interrupt_exception&)
--- a/liboctave/util/oct-shlib.cc	Tue Feb 15 18:57:16 2022 +0100
+++ b/liboctave/util/oct-shlib.cc	Thu Feb 17 22:42:22 2022 -0500
@@ -27,6 +27,7 @@
 #  include "config.h"
 #endif
 
+#include <list>
 #include <map>
 
 extern "C"
@@ -59,6 +60,20 @@
 
 namespace octave
 {
+  std::list<dynamic_library> possibly_unreferenced_dynamic_libraries;
+
+  void dynamic_library::delete_later (void)
+  {
+    possibly_unreferenced_dynamic_libraries.push_back (*this);
+  }
+
+  int release_unreferenced_dynamic_libraries (void)
+  {
+    possibly_unreferenced_dynamic_libraries.clear ();
+
+    return 0;
+  }
+
   dynamic_library::dynlib_rep::dynlib_rep (const std::string& f)
     : m_count (1), m_fcn_names (), m_file (f), m_time_loaded (),
       m_search_all_loaded (false)
--- a/liboctave/util/oct-shlib.h	Tue Feb 15 18:57:16 2022 +0100
+++ b/liboctave/util/oct-shlib.h	Thu Feb 17 22:42:22 2022 -0500
@@ -133,6 +133,8 @@
         delete m_rep;
     }
 
+    void delete_later (void);
+
     dynamic_library (const dynamic_library& sl)
       : m_rep (sl.m_rep)
     {
@@ -204,6 +206,11 @@
 
     dynlib_rep *m_rep;
   };
+
+  // FIXME: Currently must return int so that it may be used as an
+  // event_hook function.
+
+  OCTAVE_API int release_unreferenced_dynamic_libraries (void);
 }
 
 #endif