|
On 20-Aug-05, at 7:19 PM, David Given wrote:
I am curious to know what happens if a coroutine nils out its own lastreference, though. Does the program counter carry an implicit reference tothe code its executing? What happens when the coroutine yields?
The currently running thread (and therefore its stack) are always part of the gc root. So is the "main thread" (and its stack).
If there is no reference left to a coroutine and the coroutine yields, then it will get garbage collected at some point.