Skip to content
Snippets Groups Projects
Commit 9084a330 authored by Lars Kanis's avatar Lars Kanis
Browse files

Release ressources for interrupt handling.

parent 9b93d941
No related branches found
No related tags found
No related merge requests found
...@@ -94,7 +94,18 @@ void FXRbApp::setThreadsEnabled(FXbool enabled){ ...@@ -94,7 +94,18 @@ void FXRbApp::setThreadsEnabled(FXbool enabled){
} }
else{ else{
m_bThreadsEnabled=FALSE; m_bThreadsEnabled=FALSE;
#if defined(HAVE_RB_THREAD_CALL_WITHOUT_GVL)
#ifdef WIN32
removeInput(interrupt_event,INPUT_READ);
CloseHandle(interrupt_event); interrupt_event = NULL;
#else
removeInput(interrupt_fds[0],INPUT_READ);
close(interrupt_fds[0]); interrupt_fds[0] = -1;
close(interrupt_fds[1]); interrupt_fds[1] = -1;
#endif
#else
removeChore(this,ID_CHORE_THREADS); removeChore(this,ID_CHORE_THREADS);
#endif
} }
} }
...@@ -168,6 +179,7 @@ void fxrb_wakeup_fox(void *){ ...@@ -168,6 +179,7 @@ void fxrb_wakeup_fox(void *){
FXRbApp::~FXRbApp(){ FXRbApp::~FXRbApp(){
FXTRACE((100,"FXRbApp::~FXRbApp()\n")); FXTRACE((100,"FXRbApp::~FXRbApp()\n"));
VALUE myRegistry; VALUE myRegistry;
setThreadsEnabled(FALSE);
FXRbDestroyAppSensitiveObjects(); FXRbDestroyAppSensitiveObjects();
myRegistry=FXRbGetRubyObj(&(reg()),true); myRegistry=FXRbGetRubyObj(&(reg()),true);
if(!NIL_P(myRegistry)){ if(!NIL_P(myRegistry)){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment