Fix R memory leak on exception
There is a possible memory leak in case the SWIG_exception_fail macro is called. The problem is related to its definition that call the function Rf_warning. This function (as well as Rf_error) involves a longjmp over C++ destructors on the stack. Thus, all the objects allocated on the heap are not freed. Closes #914
This commit is contained in:
parent
b0ce22625b
commit
3fa5c8c652
6 changed files with 129 additions and 8 deletions
|
|
@ -18,6 +18,7 @@ C_TEST_CASES += \
|
|||
|
||||
CPP_TEST_CASES += \
|
||||
r_double_delete \
|
||||
r_memory_leak \
|
||||
r_overload_array \
|
||||
r_sexp \
|
||||
r_overload_comma \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue