[Issue 3523] Fiber is not garbage collected properly

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Nov 24 16:05:23 PST 2009


http://d.puremagic.com/issues/show_bug.cgi?id=3523



--- Comment #3 from Witold Baryluk <baryluk at smp.if.uj.edu.pl> 2009-11-24 16:05:22 PST ---
I "solved" my problem by changin one of my base clases from:

abstract class AGenerator : Fiber {
protected:
        this(void delegate() dg) {
                super(dg);
        }
}


To:
abstract class AGenerator {
private:
        Fiber x;

protected:
        this(void delegate() dg) {
                x = new Fiber(dg);
        }
        ~this() {
                delete x;
        }
public:
        void call() {
                x.call();
        }
        void yield() {
                x.yield();
        }
        Fiber.State state() {
                return x.state;
        }
}

And it magically started working correctly (Fibers are properly destroyed).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list