Hey again,<br><br>I&#39;m trying to implement a load / unload module functionallity. When I delete the module in the __main__ dict the module&#39;s reference count is still &gt; 1. I&#39;ve been trying to find if I reference it anywhere else in my code but I can&#39;t find anything! When I did a check in vc++ debugger found something. When I run this code:<br>
<br>object obj = import(name.c_str());            <br><br><i>obj</i>&#39;s <i>ob_refcnt</i> member is 2 when I check in the vc++ debugger. Shouldn&#39;t it be 1?<br><br>After that line, I put it in the __main__ dict like:<br>
<br>mMainNamespace[ name.c_str() ] = obj;<br><br>The reference count shows 4, as expected.<br><br>When I&#39;m entering my unload() function when I want to remove the module I do like:<br>void unload()<br>{<br>    object t = mMainNamespace[ name.c_str() ];<br>
    // reference count in t is now 4 ?<br><br>     mMainNamespace[ name.c_str() ].del(); // I delete but it&#39;s not unloaded properly because it&#39;s still referenced somewhere ..<br>}<br><br>What does import() do? It must save some reference somewhere?<br>
<br>