<html><head>


<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:\7B49\7EBF;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@\7B49\7EBF";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word"><div>On Thu, 2021-09-16 at 05:40 +0000, Kevin Song via gstreamer-devel wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div class="WordSection1"><p class="MsoNormal"><span style="font-size: 11pt;"> </span></p><p class="MsoNormal">I found GStreamer don’t unload plugin library when destroy pipeline. Why we have this kind of design? Is it possible to unload the plugin library? We need this as there maybe big library linked to plugin, we need save memory after removed the plugin in the pipeline.</p></div></blockquote><div><br></div><div>The reason is that getting this right is very complicated. It's not just GStreamer and plugin code that would need to be suitable for unloading (and reloading), but also any plugin's dependencies.</div><div>Many libraries don't safely allow this, and even GLib is an example of a library that can't be safely unloaded/reloaded.</div><div><br></div><div>For memory usage, shared libraries are usually just mmap'd into the process and because of that don't necessarily use a lot of memory. If your library actually does use a lot of memory, it might be a good sign for it being a case that can't be safely unloaded/reloaded.</div><div><br></div><div><span><pre>-- <br></pre><div data-evo-paragraph="" class="" style="width: 71ch;" data-evo-signature-plain-text-mode="">Sebastian Dröge, Centricular Ltd · <a href="http://www.centricular.com">https://www.centricular.com</a></div><div data-evo-paragraph="" class="" style="width: 71ch;"><br></div></span></div></body></html>