<br><br><div class="gmail_quote"><div dir="ltr">On Wed, Sep 7, 2016, 19:14 Andreas Pakulat <<a href="mailto:apaku@gmx.de">apaku@gmx.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
On Wed, Sep 7, 2016 at 11:57 PM, Xavion <<a href="mailto:xavion.0@gmail.com" target="_blank">xavion.0@gmail.com</a>> wrote:<br>
> So, you're both saying that the following two lines are equivalent (from a<br>
> memory footprint standpoint):<br>
><br>
> from PyQt5.QtCore import QVariant<br>
> from PyQt5 import QtCore<br>
><br>
> In other words, in both cases, the whole of 'QtCore' will be imported<br>
> (rather than just 'QVariant' in the first case).</blockquote></div><div><br></div><div>That is correct and same for all python packages/modules not just pyqt </div><div class="gmail_quote"></div><div><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> Florian: I think you're saying that I can reduce the memory usage by doing<br>
> the following...<br>
><br>
> from PyQt5 import QtCore<br>
> mVariant = QtCore.QVariant<br>
> del QtCore<br></blockquote></div><div><br></div><div>Python modules can be unloaded this way but I don't think a DLL gets unloaded from memory once it is no longer in use by an app. But even if there was code in the Python interpreter to unload a DLL it would not get used because the above code will still be holding a reference to a symbol that is defined in the DLL so the DLL will not be considered unlovable. </div><div><br></div><div>Why are you so concerned with memory occupied by modules? </div>