mirror of https://github.com/swig/swig
Fixed segfault-on-exit in octave 3.2.4
- see SourceForge #3516652 git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12994 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
117cb9b74a
commit
70e0cf60f7
|
@ -171,7 +171,9 @@ DEFUN_DLD (SWIG_name,args,nargout,SWIG_name_d) {
|
|||
// exiting without explicitly clearing the variable causes octave to segfault.
|
||||
#if OCTAVE_API_VERSION_NUMBER>=37
|
||||
octave_value_list SWIG_atexit_func(const octave_value_list &args, int nargout) {
|
||||
symbol_table::clear_global_pattern("*");
|
||||
string_vector vars = symbol_table::global_variable_names();
|
||||
for (int i = 0; i < vars.length(); i++)
|
||||
symbol_table::clear_global(vars[i]);
|
||||
symbol_table::clear_functions();
|
||||
return octave_value();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue