From: Geoffrey H. <ge...@ge...> - 2007-04-24 15:11:56
|
Noel, > Has this changed the idiom for iterating through multimolecule files? > That is, is the example code at the top of > http://openbabel.sourceforge.net/wiki/Developer:Python_Tutorial still > the correct method? In short, by using this method, am I allocating > memory that is never freed? Yes, in version 2.1, you don't need to call OBMol::Clear(), so you can change the idiom. On the other hand, in Python, I think the newly- created molecule would be freed like any other python object. You can certainly confirm by running over a few thousand objects while watching memory. In any case, that's not the issue in this particular bug. We seem to be leaving files open. I know it's a problem for gzipped files, but I'll have to investigate for regular files. Thanks, -Geoff |