# HG changeset patch # User Stefan Vogel # Date 1467735222 -7200 # Node ID 2ba8a72b1c20b019ebe1569e965e3ee9fa229c61 # Parent 401939e91ddb7a49917dbb8dbcca861ceace776b #BUGFIX by stefan class: InstrumentationContext changed: #forProcess: do not keep references to dead processes (allow them to be garbage collected) diff -r 401939e91ddb -r 2ba8a72b1c20 InstrumentationContext.st --- a/InstrumentationContext.st Thu Jun 30 20:12:04 2016 +0200 +++ b/InstrumentationContext.st Tue Jul 05 18:13:42 2016 +0200 @@ -11,6 +11,8 @@ " "{ Package: 'stx:libcomp' }" +"{ NameSpace: Smalltalk }" + Object variableSubclass:#InstrumentationContext instanceVariableNames:'inInstrumentedCode enabled coverageOnly' classVariableNames:'LastProcess LastInstrumentationContext @@ -83,6 +85,14 @@ |p context| + aProcess isDead ifTrue:[ + "do not keep dead processes from being garbage collected" + aProcess == LastProcess ifTrue:[ + LastProcess := LastInstrumentationContext := nil. + ]. + ^ GlobalInstrumentationContext. + ]. + aProcess == LastProcess ifTrue:[ ^ LastInstrumentationContext ? GlobalInstrumentationContext ]. @@ -326,10 +336,10 @@ !InstrumentationContext class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libcomp/InstrumentationContext.st,v 1.15 2014-12-23 12:42:46 cg Exp $' + ^ '$Header$' ! version_CVS - ^ '$Header: /cvs/stx/stx/libcomp/InstrumentationContext.st,v 1.15 2014-12-23 12:42:46 cg Exp $' + ^ '$Header$' ! !