octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #49712] Cannot unload oct file from a SWIG gen


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #49712] Cannot unload oct file from a SWIG generated wrapper
Date: Sun, 27 Nov 2016 17:32:15 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0

Update of bug #49712 (project octave):

             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #5:

The reason for what you are seeing with swig-generated wrappers is that the
"module" function "swig_test" calls mlock, which forces it to stay loaded in
memory.

The following works for me with your example:


>> swig_test
>> test
0
>> test
1
>> test
2
>> clear -f
>> test
3
>> munlock swig_test
>> clear -f
>> test
0


I can't say why the swig authors decided to mlock this function, whether it
will break anything if this is done, or if removing the call to mlock in the
wrapper code will break anything.

I think we can say that everything is working as expected here, what you are
seeing is swig's complex usage of an oct file containing multiple functions,
using autoload to push them into the symbol table, and mlock to keep itself
loaded.

If you can find ways to improve the swig interface to Octave, certainly go for
it, but there are zero or very few Octave developers involved in developing or
working with swig at all.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?49712>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]