threads clean up their heap

This commit is contained in:
Araq 2011-06-04 23:55:10 +02:00
commit 24ed9d560f
9 changed files with 93 additions and 46 deletions

View file

@ -212,8 +212,10 @@ proc quitOrDebug() {.inline.} =
endbStep() # call the debugger
proc raiseException(e: ref E_Base, ename: CString) {.compilerRtl.} =
GC_disable() # a bad thing is an error in the GC while raising an exception
e.name = ename
if raiseHook != nil:
if not raiseHook(e): return
GC_disable() # a bad thing is an error in the GC while raising an exception
ThreadGlobals()
if ||excHandler != nil:
pushCurrentException(e)