Re: [Open Babel] Problems deleting a OBMol object

2020-03-07 Thread Alessandro S. Nascimento
Thank you both for the tips. I guess Noel got it when he said that " The general rule is that you shouldn't delete pointers returned by Open Babel API calls". That what I was doing when trying to delete an OBMol object. "Not deleting" solved the issue. I consider myself a scientist that programs

Re: [Open Babel] Problems deleting a OBMol object

2020-03-07 Thread Geoffrey Hutchison
> I haven't had a chance to test this but it looks like you're deleting > pointers that you shouldn't be. Only call "delete" if there is a > corresponding "new". The general rule is that you shouldn't delete pointers > returned by Open Babel API calls, unless the documentation explicitly states

Re: [Open Babel] Problems deleting a OBMol object

2020-03-07 Thread Noel O'Boyle
I haven't had a chance to test this but it looks like you're deleting pointers that you shouldn't be. Only call "delete" if there is a corresponding "new". The general rule is that you shouldn't delete pointers returned by Open Babel API calls, unless the documentation explicitly states that the ca

Re: [Open Babel] Problems deleting a OBMol object

2020-03-02 Thread Alessandro S. Nascimento
Hi Noel, thanks for your reply. A complete code is pasted below. The code is compiled with no problems and when executed, I get the following (and expected) output: $ McConf 169517407.mol2.gz *

Re: [Open Babel] Problems deleting a OBMol object

2020-03-01 Thread Noel O'Boyle
It would help us if you could provide the shortest possible (but complete) example code that exhibits the problem. As it is, you say the problem is when you delete the molecule, but there is no line that deletes the molecule. On Thu, 27 Feb 2020 at 16:19, Alessandro S. Nascimento < asnascime...@if