coroutine garbage
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: coroutine garbage
- From: Markus Huber <pulse@...>
- Date: 2004年7月22日 11:39:23 +0200 (BST)
If I recall coroutine.resume() not until the dead status is reached. And
of course the coroutine is hold in an local variable. Question: Is this
coroutine clean garbaged when the block where the local coroutine is
defined is leaved?
do
local MyProducer=Producer() -- returns the coroutine
repeat
Error,Data=coroutine.resume(MyProducer)
until not Data
print(coroutine.status(MyProducer)) --> suspended!
end
print(MyProducer) --> nil
Hopefully this technic is clean.
--
Markus