[BangPypers] Simulating atexit using weakref (was How to run a block of code just before the interpreter is being exited ...)
Anand Chitipothu
anandology at gmail.com
Tue Sep 10 08:48:47 CEST 2013
On Tue, Sep 10, 2013 at 12:13 PM, Noufal Ibrahim <noufal at nibrahim.net.in>wrote:
> [...]
> This whole business is kind of surreptitious.
>
> The PyODE library had a "world" object which can hold multiple
> geometries in it. Once you add it to the world, you expect it to keep
> track of the geometries. However, it doesn't and if the geometry objects
> go out of scope, it actually removes them from the world messing
> everything up. To keep them in there, you have to keep some references
> in Python land to the objects by putting them in a list or something.
>
Isn't that the job of PyODE library to keep track objects in the world by
adding them to a list or something?
Anand
More information about the BangPypers
mailing list