Comment 2 for bug 1339701

Revision history for this message
rdb (rdb) wrote :

I found out what caused it to leak: when the tasks were removed, removal events get fired off and unless the event queue is explicitly flushed they keep a reference to the task (which keep a reference to ShowBase).

So, I can now start and destroy ShowBase multiple times. It's still advisable to call gc.collect() in between so that you clear up any cyclic references.