From: John L. <le...@cs...> - 2005-11-09 01:43:29
|
On Tue, November 8, 2005 10:11 am, Marcelo Matus said: > Well, I added a method to destroy the module to pyrun.swg: > > SWIG_Python_DestroyModule() > > and it is destroying the python part, ie, the ty->cliendatas properly, > which seems to be the origin of the reported error. For the other > part that you mention, I have no idea what are you talking about :), > so, I leave it to you for whenever you have time. But I don't > know if is really needed anyway. > > What I am talking about is two modules, one of which imports the other. say modA and modB, with modB importing modA. Say modA is loaded, then modB is loaded. At some point we would like to unload modB, but continue running with modA still loaded. The problem is the circularly linked list of modules (swig_module_info) and types, there are some pointers pointing into modBs memory. If we don't fix those up, sometime later the code might try and access that (non-existant) information. If some language module needs that ability, I can write the code to do it. But as you say, I don't think anyone needs it since every language just loads a module and assumes it stays loaded until the interpreter exits. John |