On 8/27/2020 8:48 PM, Jason Biggs wrote:

I'm not very familiar with how the python interface works, is there a
similar issue with the python wrappers?  Does the wrapper class for the
Atom clean up after itself differently if the atom is marked as having an
owner?

There Be Dragons.

Python VM does reference counting on its own objects and will destroy them for you at some point. Exactly how it works out with objects created by external libraries is an interesting question.

SWIG, for example, creates a "proxy" python object for each c++ one, with a flag that tells the runtime to either destroy the underlying c++ object when the "proxy" is garbage-collected, or not. E.g. if you garbage-collect an Atom on python side, you have no idea if destroying its linked c++ Atom will mess up its c++ ROMol container, so on container/element-type objects the flag's typically a "not".

Dima


_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to