Re: [Rdkit-discuss] c++ atomic lifetime

2020-08-28 Thread Jason Biggs
Jason Biggs On Fri, Aug 28, 2020 at 8:16 PM dmaziuk via Rdkit-discuss < rdkit-discuss@lists.sourceforge.net> wrote: > 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

Re: [Rdkit-discuss] c++ atomic lifetime

2020-08-28 Thread Greg Landrum
Hi Jason, On Fri, Aug 28, 2020 at 3:50 AM Jason Biggs wrote: > > In my application, I have a wrapper class that I expose to top level > users, which holds a unique pointer to an ROMol. I know then that when my > wrapper class member goes away so does the ROMol. What I don't have is a > similar

Re: [Rdkit-discuss] c++ atomic lifetime

2020-08-28 Thread dmaziuk via Rdkit-discuss
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

Re: [Rdkit-discuss] c++ atomic lifetime

2020-08-28 Thread dmaziuk via Rdkit-discuss
On 8/28/2020 12:30 AM, Paul Emsley wrote: Isn't this the soft of undefined behaviour that one would expect when accessing deleted memory? Try adding some code between the deletion of mol and the access of atom that allocates and deallocs some memory for a second or so. Anyway, I wouldn't

Re: [Rdkit-discuss] c++ atomic lifetime

2020-08-28 Thread Paolo Tosco
Hi Jason. to pinpoint potential memory issues you may run your code through valgrind. For example, it would flag access to previously freed memory in your program: 1 #include 2 #include 3 #include 4 5 int main() { 6 auto mol =